From de1539ac1d351b391f1a00002342309491818269 Mon Sep 17 00:00:00 2001 From: GJ Date: Fri, 9 Mar 2012 01:44:29 -0500 Subject: [PATCH] Cleanup. --- .../nossr50/listeners/mcBlockListener.java | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/listeners/mcBlockListener.java b/src/main/java/com/gmail/nossr50/listeners/mcBlockListener.java index bb9d251f3..31c640c95 100644 --- a/src/main/java/com/gmail/nossr50/listeners/mcBlockListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/mcBlockListener.java @@ -114,9 +114,8 @@ public class mcBlockListener implements Listener { //Wheat && Triple drops if (PP.getGreenTerraMode() && Herbalism.canBeGreenTerra(block)) { - //Called twice for triple drop functionality - Herbalism.herbalismProcCheck(block, player, event, plugin); Herbalism.herbalismProcCheck(block, player, event, plugin); + Herbalism.herbalismProcCheck(block, player, event, plugin); //Called twice for triple drop functionality } if (mcPermissions.getInstance().herbalism(player) && block.getData() != (byte) 0x5 && Herbalism.canBeGreenTerra(block)) { @@ -152,6 +151,7 @@ public class mcBlockListener implements Listener { if (PP.getTreeFellerMode() && mcPermissions.getInstance().woodCuttingAbility(player)) { WoodCutting.treeFeller(event, plugin); } + /* * EXCAVATION */ @@ -262,13 +262,19 @@ public class mcBlockListener implements Listener { } } } - + + /** + * Monitor BlockFromTo events. + * + * @param event The event to monitor + */ @EventHandler - public void onBlockFromTo(BlockFromToEvent event) - { + public void onBlockFromTo(BlockFromToEvent event) { Block blockFrom = event.getBlock(); Block blockTo = event.getToBlock(); - if(BlockChecks.shouldBeWatched(blockFrom.getType()) && blockFrom.getData() == (byte)5) - blockTo.setData((byte)5); + + if (BlockChecks.shouldBeWatched(blockFrom.getType()) && blockFrom.getData() == (byte) 5) { + blockTo.setData((byte) 5); + } } }