mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-02 22:16:03 +00:00
Noswing detection for PvP/PvE
This commit is contained in:
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);
|
||||
|
||||
Reference in new issue
Block a user