reliably restore flight on safelogin to prevent airborne players fall…#6590
Open
Rushikumar-06 wants to merge 1 commit into
Open
reliably restore flight on safelogin to prevent airborne players fall…#6590Rushikumar-06 wants to merge 1 commit into
Rushikumar-06 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes #6587
Details
Proposed fix:
When a player with
essentials.fly.safeloginrejoins while airborne, EssentialsXrestores their flight synchronously inside
PlayerJoinEvent. On some serverversions the client sends a flight-abilities sync shortly after join that resets
the flying state, dropping the player out of the air despite the permission.
This PR re-applies the flight state one tick later via a delayed task (mirroring
the existing world-change flight handling in the same class), so it sticks after
the client settles and the player keeps flying instead of falling. The change is
scoped entirely within the existing
essentials.fly.safeloginblock, so playerswithout the permission are unaffected.