mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-02 06:28:52 +00:00
Added FastLadder check, fixed glide false positive
This commit is contained in:
1 parent
0288a9734a
commit
cc51e9307f
14 files changed
+146
-14
No files matched your search
@@ -290,6 +290,22 @@ public final class Utilities {
|
||||
|| player.getLocation().getBlock().getRelative(BlockFace.DOWN).getType() == COB_WEB
|
||||
|| player.getLocation().getBlock().getRelative(BlockFace.UP).getType() == COB_WEB;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether a player is near a climbable block
|
||||
*
|
||||
* @param player player to check
|
||||
* @return true if near climbable block
|
||||
*/
|
||||
public static boolean isNearClimbable(Player player) {
|
||||
return isClimbableBlock(player.getLocation().getBlock())
|
||||
|| isClimbableBlock(player.getLocation().getBlock().getRelative(BlockFace.DOWN))
|
||||
|| isClimbableBlock(player.getLocation().getBlock().getRelative(BlockFace.UP))
|
||||
|| isClimbableBlock(player.getLocation().getBlock().getRelative(BlockFace.NORTH))
|
||||
|| isClimbableBlock(player.getLocation().getBlock().getRelative(BlockFace.SOUTH))
|
||||
|| isClimbableBlock(player.getLocation().getBlock().getRelative(BlockFace.EAST))
|
||||
|| isClimbableBlock(player.getLocation().getBlock().getRelative(BlockFace.WEST));
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether a block is climbable
|
||||
|
||||
Reference in new issue
Block a user