mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-02 22:16:03 +00:00
Another small fix for mcMMO compatibility, also updated to 1.2
This commit is contained in:
1 parent
4e27dacab3
commit
b57883e795
6 files changed
+12
-9
No files matched your search
@@ -86,7 +86,7 @@ public class BlockListener extends EventListener
|
||||
if(checkManager.willCheck(player, CheckType.LONG_REACH))
|
||||
{
|
||||
Distance distance = new Distance(player.getLocation(),block.getLocation());
|
||||
if(backend.checkLongReachBlock(distance.getXDifference(),distance.getYDifference(),distance.getZDifference()))
|
||||
if(backend.checkLongReachBlock(player,distance.getXDifference(),distance.getYDifference(),distance.getZDifference()))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
log("tried to break a block of "+block.getType().name()+" that was too far away.",player,CheckType.LONG_REACH);
|
||||
|
||||
@@ -18,8 +18,11 @@
|
||||
|
||||
package net.h31ix.anticheat.event;
|
||||
|
||||
import net.h31ix.anticheat.manage.Backend;
|
||||
import net.h31ix.anticheat.manage.CheckManager;
|
||||
import net.h31ix.anticheat.manage.CheckType;
|
||||
import net.h31ix.anticheat.manage.Distance;
|
||||
import net.h31ix.anticheat.util.Utilities;
|
||||
import net.h31ix.anticheat.manage.*;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
@@ -123,8 +126,8 @@ public class PlayerListener extends EventListener
|
||||
}
|
||||
if(event.getClickedBlock() != null)
|
||||
{
|
||||
Distance distance = new Distance(event.getPlayer().getLocation(), event.getClickedBlock().getLocation());
|
||||
backend.checkLongReachBlock(distance.getXDifference(), distance.getYDifference(), distance.getZDifference());
|
||||
Distance distance = new Distance(player.getLocation(), event.getClickedBlock().getLocation());
|
||||
backend.checkLongReachBlock(player,distance.getXDifference(), distance.getYDifference(), distance.getZDifference());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user