diff options
author | KHobbits <rob@khobbits.co.uk> | 2013-02-05 12:07:36 -0800 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2013-02-05 12:07:36 -0800 |
commit | 4493d7d00c4b782fe2a17a8b6c993917b8068e9b (patch) | |
tree | 8ee5bd9e351dce3288ec398549e1e16668ae6175 | |
parent | a3b2ffdeef4d96f06db91f95a67cca455f900e30 (diff) | |
parent | 631692d76347452d454ff07680ba0ea47a17e2b2 (diff) | |
download | Essentials-4493d7d00c4b782fe2a17a8b6c993917b8068e9b.tar Essentials-4493d7d00c4b782fe2a17a8b6c993917b8068e9b.tar.gz Essentials-4493d7d00c4b782fe2a17a8b6c993917b8068e9b.tar.lz Essentials-4493d7d00c4b782fe2a17a8b6c993917b8068e9b.tar.xz Essentials-4493d7d00c4b782fe2a17a8b6c993917b8068e9b.zip |
Merge pull request #302 from GunfighterJ/patch-9
Prevents flying from being disabled on world teleport if player has esse...
-rw-r--r-- | Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java | 6 |
1 files 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); } |