mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-02 06:28:52 +00:00
Fixed 3 false positives in water, one with beds and returned to old "getGoodLocation"
This commit is contained in:
1 parent
168c25e5d2
commit
6966582e4c
8 files changed
+42
-14
No files matched your search
@@ -424,9 +424,16 @@ public final class Utilities {
|
||||
public static boolean isInWater(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.UP).isLiquid()
|
||||
|| (!VersionUtil.isBountifulUpdate()
|
||||
&& (player.getLocation().getBlock().getType() == XMaterial.KELP_PLANT.parseMaterial()
|
||||
|| player.getLocation().getBlock().getRelative(BlockFace.UP)
|
||||
.getType() == XMaterial.KELP_PLANT.parseMaterial()
|
||||
|| player.getLocation().getBlock().getRelative(BlockFace.DOWN)
|
||||
.getType() == XMaterial.KELP_PLANT.parseMaterial())
|
||||
&& isNearWater(player));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Determine whether a player is near a liquid block
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user