mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-02 06:28:52 +00:00
Added Visual check (via @SuperSpyTX), fixes issue #26
This commit is contained in:
1 parent
77c8b57afb
commit
bb7b43afdb
7 files changed
+23
-26
No files matched your search
@@ -274,26 +274,21 @@ public class Backend
|
||||
|
||||
public boolean checkInteraction(Player player, Block block)
|
||||
{
|
||||
// The most complicated check in the world...approaching nirvana.
|
||||
int strikes = 0;
|
||||
|
||||
// now let's swing the bat.
|
||||
|
||||
// First Line of Defense
|
||||
Block imple = player.getTargetBlock(null, 5);
|
||||
if(imple.getTypeId() != block.getTypeId())
|
||||
{
|
||||
strikes++;
|
||||
strikes++;
|
||||
}
|
||||
|
||||
// Second line of defense.
|
||||
if(!imple.getLocation().equals(block.getLocation()))
|
||||
{
|
||||
strikes++;
|
||||
strikes++;
|
||||
}
|
||||
|
||||
// ShamWow! That check was extremely easy!
|
||||
|
||||
|
||||
return strikes > 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user