mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-27 19:47:42 +01:00
Prevents flying from being disabled on world teleport if player has essentials.fly
This commit is contained in:
parent
a3b2ffdeef
commit
631692d763
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user