Reset fly/speed on world change

This will be optional in a future version - Discuss http://goo.gl/Vuh4N
This commit is contained in:
KHobbits 2012-08-30 23:13:50 +01:00
parent 5755d647a3
commit 1773a6060d

View File

@ -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)