Fixed the possibility to use some abilities without the proper tool

This commit is contained in:
bm01 2012-07-02 21:29:25 +02:00
parent 819b6fcacb
commit 87f59cd3eb

View File

@ -305,9 +305,11 @@ public class BlockListener implements Listener {
Herbalism.greenTerra(player, block); Herbalism.greenTerra(player, block);
} }
else if (PP.getAbilityMode(AbilityType.GIGA_DRILL_BREAKER) && Skills.triggerCheck(player, block, AbilityType.GIGA_DRILL_BREAKER)) { else if (PP.getAbilityMode(AbilityType.GIGA_DRILL_BREAKER) && Skills.triggerCheck(player, block, AbilityType.GIGA_DRILL_BREAKER)) {
if (configInstance.getExcavationRequiresTool() && ItemChecks.isShovel(inHand)) { if (configInstance.getExcavationRequiresTool()) {
event.setInstaBreak(true); if (ItemChecks.isShovel(inHand)) {
Excavation.gigaDrillBreaker(player, block); event.setInstaBreak(true);
Excavation.gigaDrillBreaker(player, block);
}
} }
else { else {
event.setInstaBreak(true); 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)) { else if (PP.getAbilityMode(AbilityType.SUPER_BREAKER) && Skills.triggerCheck(player, block, AbilityType.SUPER_BREAKER)) {
if (configInstance.getMiningRequiresTool() && ItemChecks.isPickaxe(inHand)) { if (configInstance.getMiningRequiresTool()) {
event.setInstaBreak(true); if (ItemChecks.isPickaxe(inHand)) {
Mining.superBreakerBlockCheck(player, block); event.setInstaBreak(true);
Mining.superBreakerBlockCheck(player, block);
}
} }
else { else {
event.setInstaBreak(true); event.setInstaBreak(true);