From c3eebcc9be558d062b7d89f7d4712720079a0dd0 Mon Sep 17 00:00:00 2001 From: asofold Date: Mon, 1 Oct 2012 02:22:50 +0200 Subject: [PATCH] Add convenience methods for debugging. --- .../nocheatplus/utilities/BlockProperties.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/fr/neatmonster/nocheatplus/utilities/BlockProperties.java b/src/fr/neatmonster/nocheatplus/utilities/BlockProperties.java index 2ccab6b9..a124837e 100644 --- a/src/fr/neatmonster/nocheatplus/utilities/BlockProperties.java +++ b/src/fr/neatmonster/nocheatplus/utilities/BlockProperties.java @@ -844,5 +844,23 @@ public class BlockProperties { return false; } } + + /** + * Convenience method for debugging purposes. + * @param loc + * @return + */ + public static final boolean isPassable(final PlayerLocation loc) { + return isPassable(loc.getBlockAccess(), loc.getX(), loc.getY(), loc.getZ(), loc.getTypeId()); + } + + /** + * Convenience method for debugging purposes. + * @param loc + * @return + */ + public static final boolean isPassable(final Location loc) { + return isPassable(((org.bukkit.craftbukkit.CraftWorld) loc.getWorld()).getHandle(), loc.getX(), loc.getY(), loc.getZ(), loc.getBlock().getTypeId()); + } }