From 631692d76347452d454ff07680ba0ea47a17e2b2 Mon Sep 17 00:00:00 2001 From: GunfighterJ Date: Tue, 5 Feb 2013 13:16:27 -0600 Subject: [PATCH] Prevents flying from being disabled on world teleport if player has essentials.fly --- .../com/earth2me/essentials/EssentialsPlayerListener.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index 6753ad9e1..c7b7b3201 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -396,11 +396,11 @@ public class EssentialsPlayerListener implements Listener } } - @EventHandler(priority = EventPriority.LOW) + @EventHandler(priority = EventPriority.NORMAL) public void onPlayerChangedWorldHack(final PlayerChangedWorldEvent event) { - final Player user = event.getPlayer(); - if (user.getGameMode() != GameMode.CREATIVE) + final User user = ess.getUser(event.getPlayer()); + if (user.getGameMode() != GameMode.CREATIVE && !user.isAuthorized("essentials.fly")) { user.setAllowFlight(false); }