mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 14:38:56 +00:00
Hopefully a quick fix for issue #71 - check for vines before fly check
This commit is contained in:
1 parent
79b6b787ff
commit
6e4b4e4e46
2 files changed
+10
-5
No files matched your search
@@ -173,7 +173,7 @@ public class Backend
|
||||
|
||||
public boolean checkSpider(Player player, double y)
|
||||
{
|
||||
if (y <= LADDER_Y_MAX && y >= LADDER_Y_MIN && !Utilities.isOnLadder(player))
|
||||
if (y <= LADDER_Y_MAX && y >= LADDER_Y_MIN && !Utilities.isOnClimbableBlock(player))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -388,7 +388,7 @@ public class Backend
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!isMovingExempt(player) && !Utilities.isOnLadder(player) && !player.isInsideVehicle() && !Utilities.isInWater(player))
|
||||
if (!isMovingExempt(player) && !Utilities.isOnClimbableBlock(player) && !player.isInsideVehicle() && !Utilities.isInWater(player))
|
||||
{
|
||||
double y1 = player.getLocation().getY();
|
||||
String name = player.getName();
|
||||
@@ -459,7 +459,7 @@ public class Backend
|
||||
double y1 = distance.fromY();
|
||||
double y2 = distance.toY();
|
||||
Block block = player.getLocation().getBlock().getRelative(BlockFace.DOWN);
|
||||
if (y1 == y2 && !isMovingExempt(player) && !player.isInsideVehicle() && player.getFallDistance() == 0 && !Utilities.isOnLilyPad(player))
|
||||
if (y1 == y2 && !isMovingExempt(player) && !player.isInsideVehicle() && player.getFallDistance() == 0 && !Utilities.isOnLilyPad(player) && !Utilities.isOnVine(player))
|
||||
{
|
||||
String name = player.getName();
|
||||
if (Utilities.cantStandAt(block) && !Utilities.isOnLilyPad(player) && Utilities.cantStandAt(player.getLocation().getBlock()) && !Utilities.isInWater(player))
|
||||
@@ -520,7 +520,7 @@ public class Backend
|
||||
max += 12;
|
||||
}
|
||||
Block block = player.getLocation().getBlock();
|
||||
if (!isMovingExempt(player) && !Utilities.isInWater(player) && !Utilities.isOnLadder(player) && !player.isInsideVehicle())
|
||||
if (!isMovingExempt(player) && !Utilities.isInWater(player) && !Utilities.isOnClimbableBlock(player) && !player.isInsideVehicle())
|
||||
{
|
||||
String name = player.getName();
|
||||
if (y1 < y2)
|
||||
|
||||
@@ -126,10 +126,15 @@ public final class Utilities
|
||||
return player.getLocation().getBlock().isLiquid() || player.getLocation().getBlock().getRelative(BlockFace.DOWN).isLiquid() || player.getLocation().getBlock().getRelative(BlockFace.UP).isLiquid();
|
||||
}
|
||||
|
||||
public static boolean isOnLadder(Player player)
|
||||
public static boolean isOnClimbableBlock(Player player)
|
||||
{
|
||||
return player.getLocation().getBlock().getType() == Material.VINE || player.getLocation().getBlock().getType() == Material.LADDER;
|
||||
}
|
||||
|
||||
public static boolean isOnVine(Player player)
|
||||
{
|
||||
return player.getLocation().getBlock().getType() == Material.VINE;
|
||||
}
|
||||
|
||||
public static boolean isInt(String string)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user