mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-28 05:05:14 +01:00
remove speed if player moves
This commit is contained in:
parent
92777cd383
commit
c937338fc4
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user