Skip to content

Fix vanish-granted flight persisting after reappear, quit and relog#93

Open
MiddleXen wants to merge 3 commits into
LeonMangler:masterfrom
MiddleXen:master
Open

Fix vanish-granted flight persisting after reappear, quit and relog#93
MiddleXen wants to merge 3 commits into
LeonMangler:masterfrom
MiddleXen:master

Conversation

@MiddleXen

Copy link
Copy Markdown

Summary

Fixes a bug where flight granted by vanish could persist after the player was no longer invisible.

Problem

In the current version, flight reset only happens inside showPlayer() when using /sv off:

  • only setAllowFlight(false) is called, setFlying(false) is missing
  • no flight reset when a player rejoins while no longer vanished
  • no flight reset when ReappearOnQuit auto-unvanishes the player on disconnect

Solution

  • Added VisibilityChanger.resetVanishFlight() with shared logic
  • Call it from showPlayer(), JoinListener (non-vanished join), and QuitListener (auto-reappear on quit)
  • Disable both allowFlight and flying, respecting sv.keepfly and gamemode checks

Changed files

  • VisibilityChanger.java
  • JoinListener.java
  • QuitListener.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant