From cbeb994b69a032dbee548d09e62baf0f3abcdec0 Mon Sep 17 00:00:00 2001 From: gmcferrin Date: Sun, 5 Feb 2012 23:16:25 -0500 Subject: [PATCH] Fix bug with Leaf Blower. --- .../java/com/gmail/nossr50/listeners/mcBlockListener.java | 4 +++- src/main/java/com/gmail/nossr50/skills/WoodCutting.java | 6 ------ 2 files changed, 3 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 2d1799cd4..e7aeb0c03 100644 --- a/src/main/java/com/gmail/nossr50/listeners/mcBlockListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/mcBlockListener.java @@ -379,9 +379,10 @@ public class mcBlockListener implements Listener { if(LoadProperties.woodcuttingrequiresaxe) { - if(m.isAxes(inhand)) + if(m.isAxes(inhand)){ event.setInstaBreak(true); WoodCutting.leafBlower(player, block); + } } else{ event.setInstaBreak(true); @@ -389,6 +390,7 @@ public class mcBlockListener implements Listener } } + if(block.getType() == Material.AIR && plugin.misc.blockWatchList.contains(block)) { plugin.misc.blockWatchList.remove(block); diff --git a/src/main/java/com/gmail/nossr50/skills/WoodCutting.java b/src/main/java/com/gmail/nossr50/skills/WoodCutting.java index dd2f238e4..e5e3bc4ad 100644 --- a/src/main/java/com/gmail/nossr50/skills/WoodCutting.java +++ b/src/main/java/com/gmail/nossr50/skills/WoodCutting.java @@ -213,12 +213,6 @@ public class WoodCutting m.damageTool(player, (short) LoadProperties.abilityDurabilityLoss); } - if(Math.random() * 10 > 9) - { - ItemStack x = new ItemStack(Material.SAPLING, 1, (short)0, (byte)(block.getData()-8)); - m.mcDropItem(block.getLocation(), x); - } - if(LoadProperties.spoutEnabled) SpoutStuff.playSoundForPlayer(SoundEffect.POP, player, block.getLocation()); }