From 28953682aeade85d3a1abafd9f0caac5b32523f8 Mon Sep 17 00:00:00 2001 From: graywolf336 Date: Mon, 20 Jan 2014 12:10:12 -0600 Subject: [PATCH] Add some debugging messages to the placing/breaking so we can see what block are what, will be helpful for figuring out what to add to the whitelist of placing/breaking. --- .../java/com/graywolf336/jail/listeners/BlockListener.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/graywolf336/jail/listeners/BlockListener.java b/src/main/java/com/graywolf336/jail/listeners/BlockListener.java index d5e5708..c6418ef 100644 --- a/src/main/java/com/graywolf336/jail/listeners/BlockListener.java +++ b/src/main/java/com/graywolf336/jail/listeners/BlockListener.java @@ -17,6 +17,9 @@ public class BlockListener implements Listener { @EventHandler(ignoreCancelled=true) public void blockBreak(BlockBreakEvent event) { + //If we're in debugging mode, let's send the player what block they're breaking. + if(pl.inDebug()) event.getPlayer().sendMessage("[Jail Debug]: " + event.getBlock().getType().toString()); + //If we are protecting against block breaking, then let's do the action. //If we're not, let's not use any processing power to get the jail //where this block was broke at @@ -35,6 +38,8 @@ public class BlockListener implements Listener { @EventHandler(ignoreCancelled=true) public void blockPlace(BlockPlaceEvent event) { + //If we're in debugging mode, let's send the player what block they're placing. + if(pl.inDebug()) event.getPlayer().sendMessage("[Jail Debug]: " + event.getBlock().getType().toString()); //If we are protecting against block placing, then let's do the action. //If we're not, let's not use any processing power to get the jail