Prevents flying from being disabled on world teleport if player has essentials.fly

This commit is contained in:
GunfighterJ 2013-02-05 13:16:27 -06:00
parent a3b2ffdeef
commit 631692d763

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)
{
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);
}