mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-09-10 12:19:57 +00:00
Reset fly/speed on world change
This will be optional in a future version - Discuss http://goo.gl/Vuh4N
This commit is contained in:
parent
5755d647a3
commit
1773a6060d
|
@ -343,6 +343,15 @@ public class EssentialsPlayerListener implements Listener
|
|||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void onPlayerChangedWorldHack(final PlayerChangedWorldEvent event)
|
||||
{
|
||||
final Player user = event.getPlayer();
|
||||
user.setAllowFlight(false);
|
||||
user.setFlySpeed(0.1f);
|
||||
user.setWalkSpeed(0.2f);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
public void onPlayerChangedWorld(final PlayerChangedWorldEvent event)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue