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:
H31IX committed 2012-06-09 13:15:41 -04:00
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;