Packet rate limit

This commit is contained in:
Anuken
2022-10-27 10:30:28 -04:00
parent be437d63d5
commit c8ebe0cd87
5 changed files with 17 additions and 2 deletions

View File

@@ -556,6 +556,11 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
public static void unitClear(Player player){
if(player == null) return;
//make sure player is allowed to control the building
if(net.server() && !netServer.admins.allowAction(player, ActionType.respawn, action -> {})){
throw new ValidateException(player, "Player cannot respawn.");
}
if(!player.dead() && !player.unit().spawnedByCore){
var docked = player.unit().dockedType;