mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-03 14:38:46 +00:00
Merge pull request #70 from mbax/plates
Fix issue #67 - do not trigger visual check for PHYSICAL interaction
This commit is contained in:
commit
3a6fc9f6b6
1 file changed
+8
-8
@@ -171,18 +171,18 @@ public class PlayerListener extends EventListener
|
|||||||
backend.logEatingStart(player);
|
backend.logEatingStart(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (event.getClickedBlock() != null)
|
|
||||||
{
|
|
||||||
Distance distance = new Distance(player.getLocation(), event.getClickedBlock().getLocation());
|
|
||||||
backend.checkLongReachBlock(player, distance.getXDifference(), distance.getYDifference(), distance.getZDifference());
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Visuals Check */
|
|
||||||
|
|
||||||
Block block = event.getClickedBlock();
|
Block block = event.getClickedBlock();
|
||||||
|
|
||||||
if (block != null)
|
if (block != null)
|
||||||
{
|
{
|
||||||
if (checkManager.willCheck(player, CheckType.VISUAL) && !Utilities.isPressurePlate(block.getType()))
|
Distance distance = new Distance(player.getLocation(), block.getLocation());
|
||||||
|
backend.checkLongReachBlock(player, distance.getXDifference(), distance.getYDifference(), distance.getZDifference());
|
||||||
|
|
||||||
|
|
||||||
|
/* Visuals Check */
|
||||||
|
|
||||||
|
if (checkManager.willCheck(player, CheckType.VISUAL) && event.getAction()!=Action.PHYSICAL)
|
||||||
{
|
{
|
||||||
if (backend.checkVisuals(player, block, playerClick))
|
if (backend.checkVisuals(player, block, playerClick))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user