-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Allow sneak toggling when player does not have the fly privilege #16781
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
base: master
Are you sure you want to change the base?
Conversation
|
Flight can exist without fly priv. And the setting doesn't correspond to the priv. |
I am not aware of this. Do you have an example where Flight-related behavior that is specific to mods (e.g. controlling aircrafts) is IMO out of scope for consideration here as the same could also be said about other mods that use the sneak key for other purposes than sneaking.
Elaborate? |
|
Most common is modded clients |
How are modded clients relevant here? For what reason would the authors of such clients be unable to revert this change themselves? |
|
Couldn't we simply set EDIT: I am asking because this kind of check does exist in multiple places, and it seems error-prone when it's necessary to always check both at once. |
Alternatively one can write a helper function to check whether flying is enabled by the client and allowed by the server, but IMO that belongs to a different PR. |
|
I just tested this, and seems to work as intended. I will close my issue tomorrow. |
You do not need to do that manually.
|
|
I see. |
Fixes #16780 by implementing the alternative solution.
This only affects the situation where fly mode is enabled but the player does not have the fly privilege. Sneak toggling remains disabled if the player has fly privilege and enables fly mode.
This PR is Ready for Review.
How to test