mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-29 04:28:15 +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)
|
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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user