mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-02 22:16:03 +00:00
Screw it, i'm calling it the interactables check. Only blocks that can be "switched" in anyway are blocked.
This commit is contained in:
1 parent
3a8c591c5b
commit
dcb7795f4f
4 files changed
+52
-36
No files matched your search
@@ -152,20 +152,17 @@ public class PlayerListener extends EventListener
|
||||
backend.checkLongReachBlock(player,distance.getXDifference(), distance.getYDifference(), distance.getZDifference());
|
||||
}
|
||||
|
||||
/* Visuals Check */
|
||||
if(event.getAction() == Action.LEFT_CLICK_BLOCK || event.getAction() == Action.RIGHT_CLICK_BLOCK)
|
||||
/* Interactions Check */
|
||||
Block block = event.getClickedBlock();
|
||||
if(checkManager.willCheck(player, CheckType.INTERACTION) && Utilities.isInteractable(block.getType()))
|
||||
{
|
||||
Block block = event.getClickedBlock();
|
||||
if(checkManager.willCheck(player, CheckType.VISUALS))
|
||||
// save load and actually call the backend check here.
|
||||
if(backend.checkInteraction(player, block))
|
||||
{
|
||||
// save load and actually call the backend check here.
|
||||
if(backend.checkVisuals(player, block))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
log("failed visuals check",player,CheckType.VISUALS);
|
||||
}
|
||||
event.setCancelled(true);
|
||||
log("failed interaction check",player,CheckType.INTERACTION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user