mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-11-19 01:40:00 +00:00
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:
commit
4493d7d00c
1 changed files with 3 additions and 3 deletions
|
@ -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 a new issue