mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-18 00:25:32 +01: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
@ -342,6 +342,15 @@ public class EssentialsPlayerListener implements Listener
|
||||
user.updateActivity(true);
|
||||
}
|
||||
}
|
||||
|
||||
@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 New Issue
Block a user