Noswing detection for PvP/PvE

This commit is contained in:
Adam committed 2012-05-19 01:44:56 -04:00
1 parent ce19d564e2
commit 376c79f44b
2 files changed
+21

No files matched your search

@@ -143,6 +143,15 @@ public class EntityListener extends EventListener
noHack = false;
}
}
if(checkManager.willCheck(player, CheckType.NO_SWING))
{
if(!backend.justAnimated(player))
{
event.setCancelled(true);
log("tried to damage an entity without swinging their arm.",player,CheckType.NO_SWING);
noHack = false;
}
}
if(noHack)
{
decrease(player);