mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-02 14:38:45 +00:00
Another fix for issue #40 - allow players to swim up waterfalls (even if they are not technically in it, but swimming on it's side)
This commit is contained in:
1 parent
830a223f0e
commit
aa7e9b733e
2 files changed
+14
-6
No files matched your search
@@ -108,6 +108,10 @@ public final class Utilities
|
||||
{
|
||||
return player.getLocation().getBlock().isLiquid() && player.getLocation().getBlock().getRelative(BlockFace.UP).isLiquid();
|
||||
}
|
||||
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();
|
||||
}
|
||||
public static boolean isOnLadder(Player player)
|
||||
{
|
||||
return player.getLocation().getBlock().getType() == Material.VINE || player.getLocation().getBlock().getType() == Material.LADDER;
|
||||
|
||||
Reference in new issue
Block a user