Fixed lily pad again.

This commit is contained in:
Adam committed 2012-05-12 12:52:46 -04:00
1 parent 17eda0e472
commit 98c680f770
2 files changed
+18 -4

No files matched your search

@@ -83,7 +83,7 @@ public final class Utilities
}
public static boolean canStand(Block block)
{
return !block.isLiquid() || block.getType() == Material.AIR;
return !(block.isLiquid() || block.getType() == Material.AIR);
}
public static boolean isInstantBreak(Material m)
{
@@ -97,4 +97,17 @@ public final class Utilities
{
return player.isSprinting() || player.isFlying();
}
public static boolean isOnLilyPad(Player player)
{
Block block = player.getLocation().getBlock();
Material lily = Material.WATER_LILY;
if(block.getType() == lily || block.getRelative(BlockFace.NORTH).getType() == lily || block.getRelative(BlockFace.SOUTH).getType() == lily || block.getRelative(BlockFace.EAST).getType() == lily || block.getRelative(BlockFace.WEST).getType() == lily)
{
return true;
}
else
{
return false;
}
}
}