mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-10-31 01:03:44 +01:00 
			
		
		
		
	Fixed the possibility to use some abilities without the proper tool
This commit is contained in:
		| @@ -305,10 +305,12 @@ 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()) { | ||||||
|  |                 if (ItemChecks.isShovel(inHand)) { | ||||||
|                     event.setInstaBreak(true); |                     event.setInstaBreak(true); | ||||||
|                     Excavation.gigaDrillBreaker(player, block); |                     Excavation.gigaDrillBreaker(player, block); | ||||||
|                 } |                 } | ||||||
|  |             } | ||||||
|             else { |             else { | ||||||
|                 event.setInstaBreak(true); |                 event.setInstaBreak(true); | ||||||
|                 Excavation.gigaDrillBreaker(player, block); |                 Excavation.gigaDrillBreaker(player, block); | ||||||
| @@ -327,10 +329,12 @@ 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()) { | ||||||
|  |                 if (ItemChecks.isPickaxe(inHand)) { | ||||||
|                     event.setInstaBreak(true); |                     event.setInstaBreak(true); | ||||||
|                     Mining.superBreakerBlockCheck(player, block); |                     Mining.superBreakerBlockCheck(player, block); | ||||||
|                 } |                 } | ||||||
|  |             } | ||||||
|             else { |             else { | ||||||
|                 event.setInstaBreak(true); |                 event.setInstaBreak(true); | ||||||
|                 Mining.superBreakerBlockCheck(player, block); |                 Mining.superBreakerBlockCheck(player, block); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 bm01
					bm01