From 87f59cd3eb3eac89bad8e38431c89c9ceec1295c Mon Sep 17 00:00:00 2001 From: bm01 Date: Mon, 2 Jul 2012 21:29:25 +0200 Subject: [PATCH] Fixed the possibility to use some abilities without the proper tool --- .../gmail/nossr50/listeners/BlockListener.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java index 35714b392..88147ceb9 100644 --- a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java @@ -305,9 +305,11 @@ public class BlockListener implements Listener { Herbalism.greenTerra(player, block); } else if (PP.getAbilityMode(AbilityType.GIGA_DRILL_BREAKER) && Skills.triggerCheck(player, block, AbilityType.GIGA_DRILL_BREAKER)) { - if (configInstance.getExcavationRequiresTool() && ItemChecks.isShovel(inHand)) { - event.setInstaBreak(true); - Excavation.gigaDrillBreaker(player, block); + if (configInstance.getExcavationRequiresTool()) { + if (ItemChecks.isShovel(inHand)) { + event.setInstaBreak(true); + Excavation.gigaDrillBreaker(player, block); + } } else { event.setInstaBreak(true); @@ -327,9 +329,11 @@ public class BlockListener implements Listener { } } else if (PP.getAbilityMode(AbilityType.SUPER_BREAKER) && Skills.triggerCheck(player, block, AbilityType.SUPER_BREAKER)) { - if (configInstance.getMiningRequiresTool() && ItemChecks.isPickaxe(inHand)) { - event.setInstaBreak(true); - Mining.superBreakerBlockCheck(player, block); + if (configInstance.getMiningRequiresTool()) { + if (ItemChecks.isPickaxe(inHand)) { + event.setInstaBreak(true); + Mining.superBreakerBlockCheck(player, block); + } } else { event.setInstaBreak(true);