From cc623042b836dbd9dd9c030f6e4436f546dd7e4b Mon Sep 17 00:00:00 2001 From: JRoy <10731363+JRoy@users.noreply.github.com> Date: Sat, 22 Feb 2025 22:42:22 -0500 Subject: [PATCH] Fix per-world flight permissions With the implementation of #6012, there was no permission check done when we re-add flight to user's changing worlds. This broke servers with per-world flight permissions. --- .../java/com/earth2me/essentials/EssentialsPlayerListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/main/java/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/main/java/com/earth2me/essentials/EssentialsPlayerListener.java index 84a190a027b..753b3b9a0fc 100644 --- a/Essentials/src/main/java/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/main/java/com/earth2me/essentials/EssentialsPlayerListener.java @@ -778,7 +778,7 @@ public void onPlayerChangedWorldFlyReset(final PlayerChangedWorldEvent event) { } final TickCountProvider tickCountProvider = ess.provider(TickCountProvider.class); - if (tickCountProvider != null && user.getFlightTick() == tickCountProvider.getTickCount()) { + if (tickCountProvider != null && user.getFlightTick() == tickCountProvider.getTickCount() && user.isAuthorized("essentials.fly")) { user.getBase().setAllowFlight(true); user.getBase().setFlying(true); }