Merge pull request #302 from GunfighterJ/patch-9

Prevents flying from being disabled on world teleport if player has esse...
This commit is contained in:
KHobbits 2013-02-05 12:07:36 -08:00
commit 4493d7d00c

View file

@ -396,11 +396,11 @@ public class EssentialsPlayerListener implements Listener
} }
} }
@EventHandler(priority = EventPriority.LOW) @EventHandler(priority = EventPriority.NORMAL)
public void onPlayerChangedWorldHack(final PlayerChangedWorldEvent event) public void onPlayerChangedWorldHack(final PlayerChangedWorldEvent event)
{ {
final Player user = event.getPlayer(); final User user = ess.getUser(event.getPlayer());
if (user.getGameMode() != GameMode.CREATIVE) if (user.getGameMode() != GameMode.CREATIVE && !user.isAuthorized("essentials.fly"))
{ {
user.setAllowFlight(false); user.setAllowFlight(false);
} }