summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2013-02-05 12:07:36 -0800
committerKHobbits <rob@khobbits.co.uk>2013-02-05 12:07:36 -0800
commit4493d7d00c4b782fe2a17a8b6c993917b8068e9b (patch)
tree8ee5bd9e351dce3288ec398549e1e16668ae6175
parenta3b2ffdeef4d96f06db91f95a67cca455f900e30 (diff)
parent631692d76347452d454ff07680ba0ea47a17e2b2 (diff)
downloadEssentials-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.java6
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);
}