remove speed if player moves

This commit is contained in:
Gabriele C 2015-10-12 18:47:15 +02:00
parent 92777cd383
commit c937338fc4

View File

@ -139,8 +139,13 @@ public class AuthMePlayerListener implements Listener {
return; return;
if (!Settings.isMovementAllowed) { if (!Settings.isMovementAllowed) {
if (!event.getFrom().getBlock().equals(event.getTo().getBlock())) if (Settings.isRemoveSpeedEnabled) {
player.setWalkSpeed(0.0f);
player.setFlySpeed(0.0f);
}
if (!event.getFrom().getBlock().equals(event.getTo().getBlock())) {
event.setTo(event.getFrom()); event.setTo(event.getFrom());
}
return; return;
} }