-
-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ExprPlayerViewDistance - re-enable this expression #5333
Conversation
- add fix for getter as well
instead of writing the error to console on failure, is it possible to error on acceptsChange if it's unsupported? |
unfortunately there is nothing in the API regarding if it does/doesn't work, therefor no way to check until its actually executed |
On 1.19.3 the method is Player#getClientViewDistance() |
that is to get the view distance set on the client, not the view distance the server has set for the client,
|
I see, should be ok then. |
Note: It's better to mention the note (about the 1.14 issue and it would return bukkit view distance in a specific case) in the docs description |
Good call, a note has been added to the docs. |
src/main/java/ch/njol/skript/expressions/ExprPlayerViewDistance.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/expressions/ExprPlayerViewDistance.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/expressions/ExprPlayerViewDistance.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/expressions/ExprPlayerViewDistance.java
Outdated
Show resolved
Hide resolved
- change Long -> Integer - change to SimplePropertyExpression
src/main/java/ch/njol/skript/expressions/ExprPlayerViewDistance.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/expressions/ExprPlayerViewDistance.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/expressions/ExprPlayerViewDistance.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/expressions/ExprPlayerViewDistance.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/expressions/ExprPlayerViewDistance.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/expressions/ExprPlayerViewDistance.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/expressions/ExprPlayerViewDistance.java
Outdated
Show resolved
Hide resolved
…e.java Co-authored-by: Patrick Miller <apickledwalrus@gmail.com>
…e.java Co-authored-by: Patrick Miller <apickledwalrus@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can't we use Spigot's Player#getClientViewDistance? This will allow getting on Spigot servers.
This is completely unrelated. |
Can that be disclosed in the syntax description? Even kiip1 called the same question. |
ok description has been updated. |
Description
This PR aims to re-enable the view distance expression.
This was previously removed as it was "not supported" in Paper starting in 1.14.
I'm not entirely sure which version it was re-enabled, but I do know this has been working since at least 1.17
My guess would be 1.14-1.16.x this is not working. Generally no one uses 1.14/1.15, and very very few use 1.16.x, so we shouldn't need to worry.
If the server version doesn't have this enabled:
Target Minecraft Versions: none
Requirements: none
Related Issues: none