mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-02 06:28:52 +00:00
Fixed bug in version check, fixed water-related false positive and fixed wrong permission
This commit is contained in:
1 parent
c6e4ce091a
commit
918549bc11
6 files changed
+27
-6
No files matched your search
@@ -300,6 +300,26 @@ public final class Utilities {
|
||||
|| player.getLocation().getBlock().getRelative(BlockFace.DOWN).isLiquid()
|
||||
|| player.getLocation().getBlock().getRelative(BlockFace.UP).isLiquid();
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether a player is near a liquid block
|
||||
*
|
||||
* @param player player to check
|
||||
* @return true if near liquid block
|
||||
*/
|
||||
public static boolean isNearWater(Player player) {
|
||||
return player.getLocation().getBlock().isLiquid()
|
||||
|| player.getLocation().getBlock().getRelative(BlockFace.DOWN).isLiquid()
|
||||
|| player.getLocation().getBlock().getRelative(BlockFace.UP).isLiquid()
|
||||
|| player.getLocation().getBlock().getRelative(BlockFace.NORTH).isLiquid()
|
||||
|| player.getLocation().getBlock().getRelative(BlockFace.SOUTH).isLiquid()
|
||||
|| player.getLocation().getBlock().getRelative(BlockFace.EAST).isLiquid()
|
||||
|| player.getLocation().getBlock().getRelative(BlockFace.WEST).isLiquid()
|
||||
|| player.getLocation().getBlock().getRelative(BlockFace.NORTH_EAST).isLiquid()
|
||||
|| player.getLocation().getBlock().getRelative(BlockFace.NORTH_WEST).isLiquid()
|
||||
|| player.getLocation().getBlock().getRelative(BlockFace.SOUTH_EAST).isLiquid()
|
||||
|| player.getLocation().getBlock().getRelative(BlockFace.SOUTH_WEST).isLiquid();
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether a player is in a web
|
||||
|
||||
Reference in new issue
Block a user