mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 22:14:49 +00:00
Fix FastLadder false with elytra, fix speed & flight false positive with trident, fix #122 and fix #119, fix illegalinteract false positive with torches
This commit is contained in:
1 parent
9473781a26
commit
646e906ada
9 files changed
+83
-23
No files matched your search
@@ -487,6 +487,26 @@ public final class Utilities {
|
||||
|| player.getLocation().getBlock().getRelative(BlockFace.SOUTH_EAST).isLiquid()
|
||||
|| player.getLocation().getBlock().getRelative(BlockFace.SOUTH_WEST).isLiquid();
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether a location is near a liquid block
|
||||
*
|
||||
* @param location Location to check
|
||||
* @return true if near liquid block
|
||||
*/
|
||||
public static boolean isNearWater(Location location) {
|
||||
return location.getBlock().isLiquid()
|
||||
|| location.getBlock().getRelative(BlockFace.UP).isLiquid()
|
||||
|| location.getBlock().getRelative(BlockFace.DOWN).isLiquid()
|
||||
|| location.getBlock().getRelative(BlockFace.NORTH).isLiquid()
|
||||
|| location.getBlock().getRelative(BlockFace.SOUTH).isLiquid()
|
||||
|| location.getBlock().getRelative(BlockFace.EAST).isLiquid()
|
||||
|| location.getBlock().getRelative(BlockFace.WEST).isLiquid()
|
||||
|| location.getBlock().getRelative(BlockFace.NORTH_EAST).isLiquid()
|
||||
|| location.getBlock().getRelative(BlockFace.NORTH_WEST).isLiquid()
|
||||
|| location.getBlock().getRelative(BlockFace.SOUTH_EAST).isLiquid()
|
||||
|| location.getBlock().getRelative(BlockFace.SOUTH_WEST).isLiquid();
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether a player is surrounded by liquid blocks
|
||||
|
||||
Reference in new issue
Block a user