mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-16 11:37:30 +02:00
Add permission check before resetting speed on login The staff of my server asked me to do this fix, but I think it is very useful for all. This commit change is to reset player fly & run speed only if player has no permission to change speed.
This commit is contained in:
committed by
KHobbits
parent
a894c81a6d
commit
310e41396b
@@ -331,8 +331,11 @@ public class EssentialsPlayerListener implements Listener
|
|||||||
user.getBase().sendMessage(tl("flyMode", tl("enabled"), user.getDisplayName()));
|
user.getBase().sendMessage(tl("flyMode", tl("enabled"), user.getDisplayName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
user.getBase().setFlySpeed(0.1f);
|
|
||||||
user.getBase().setWalkSpeed(0.2f);
|
if (!user.isAuthorized("essentials.speed")) {
|
||||||
|
user.getBase().setFlySpeed(0.1f);
|
||||||
|
user.getBase().setWalkSpeed(0.2f);
|
||||||
|
}
|
||||||
|
|
||||||
user.stopTransaction();
|
user.stopTransaction();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user