diff --git a/src/engine/objects/PlayerCharacter.java b/src/engine/objects/PlayerCharacter.java index 2dac4a7a..50f8e64e 100644 --- a/src/engine/objects/PlayerCharacter.java +++ b/src/engine/objects/PlayerCharacter.java @@ -179,6 +179,8 @@ public class PlayerCharacter extends AbstractCharacter { public int mineAppliedID = 0; public long lastAction = 0; + + public long lastBoxCheck = System.currentTimeMillis(); /** * No Id Constructor */ @@ -4893,6 +4895,10 @@ public class PlayerCharacter extends AbstractCharacter { } public static boolean checkIfBoxed(PlayerCharacter player){ + if(System.currentTimeMillis() < player.lastBoxCheck + 5000) + return false; + + player.lastBoxCheck = System.currentTimeMillis(); try { for (PlayerCharacter pc : SessionManager.getAllActivePlayers()) { if(pc.getClientConnection().machineID.equals(player.getClientConnection().machineID) == false)