mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 14:38:56 +00:00
Small vision check fix
This commit is contained in:
1 parent
6f617c9162
commit
244a2c1c7c
2 files changed
+4
-6
No files matched your search
@@ -21,7 +21,7 @@ public class EyeCheck {
|
||||
{
|
||||
Location loc = b.getLocation();
|
||||
double d = loc.distance(bloc);
|
||||
if(d <= 1.5D)
|
||||
if(d <= 2D)
|
||||
{
|
||||
see = true;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ public class BlockListener implements Listener {
|
||||
Player player = event.getPlayer();
|
||||
Block block = event.getBlock();
|
||||
if(player != null)
|
||||
{
|
||||
{
|
||||
//Check if an animation was done before this
|
||||
if(!am.swungArm(player))
|
||||
{
|
||||
@@ -42,7 +42,7 @@ public class BlockListener implements Listener {
|
||||
plugin.log(player.getName()+" didn't swing their arm on a block break!");
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!player.hasPermission("anticheat.longreach"))
|
||||
@@ -78,10 +78,8 @@ public class BlockListener implements Listener {
|
||||
//This is mostly used for preventing build/autobuild hacks (Logic not yet finished)
|
||||
if(!e.canSee(player, block) && !player.getWorld().getBlockAt(player.getLocation()).isLiquid())
|
||||
{
|
||||
//TODO: this is causing false alerts. Re-work the vision logic?
|
||||
//tracker.increaseLevel(player);
|
||||
plugin.log(player.getName()+" tried to place a block that they couldn't see!");
|
||||
//event.setCancelled(true);
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
if(!player.hasPermission("anticheat.longreach"))
|
||||
|
||||
Reference in new issue
Block a user