Skip to content

Commit f5efa26

Browse files
JRoymdcfe
authored andcommitted
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.
1 parent 263dab5 commit f5efa26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Essentials/src/main/java/com/earth2me/essentials/EssentialsPlayerListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ public void onPlayerChangedWorldFlyReset(final PlayerChangedWorldEvent event) {
778778
}
779779

780780
final TickCountProvider tickCountProvider = ess.provider(TickCountProvider.class);
781-
if (tickCountProvider != null && user.getFlightTick() == tickCountProvider.getTickCount()) {
781+
if (tickCountProvider != null && user.getFlightTick() == tickCountProvider.getTickCount() && user.isAuthorized("essentials.fly")) {
782782
user.getBase().setAllowFlight(true);
783783
user.getBase().setFlying(true);
784784
}

0 commit comments

Comments
 (0)