mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-17 20:11:21 +02: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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user