Browse Source

This might be better

nossr50 6 years ago
parent
commit
67a57f7472

+ 1 - 0
Changelog.txt

@@ -9,6 +9,7 @@ Key:
 
 Version 2.1.2
     (Perks) Fixed a bug where the Lucky perk wasn't adding to success
+    (Skills) mcMMO will now listen to cancelled events to remove our temporary enchantments from tools
     (Skills) Fixing a bug where Shake didn't calculate success correctly
     (Skills) Fixed a bug where Arcane Forging didn't calculate success and failure correctly
     (Skills) Fixed a bug where Salvage didn't calculate success and failure correctly

+ 4 - 1
src/main/java/com/gmail/nossr50/commands/skills/FishingCommand.java

@@ -75,7 +75,10 @@ public class FishingCommand extends SkillCommand {
                 }
             }
 
-            magicChance = percent.format(totalEnchantChance / 100.0);
+            if(totalEnchantChance > 0)
+                magicChance = percent.format(totalEnchantChance / 100.0);
+            else
+                magicChance = percent.format(magicChance);
         }
 
         // FISHING_SHAKE

+ 0 - 2
src/main/java/com/gmail/nossr50/listeners/BlockListener.java

@@ -449,8 +449,6 @@ public class BlockListener implements Listener {
         if (BlockUtils.canActivateAbilities(blockState)) {
             ItemStack heldItem = player.getInventory().getItemInMainHand();
 
-            cleanupAbilityTools(player, mcMMOPlayer, blockState, heldItem);
-
             if (mcMMOPlayer.getToolPreparationMode(ToolType.HOE) && ItemUtils.isHoe(heldItem) && (BlockUtils.affectedByGreenTerra(blockState) || BlockUtils.canMakeMossy(blockState)) && Permissions.greenTerra(player)) {
                 mcMMOPlayer.checkAbilityActivation(PrimarySkillType.HERBALISM);
             }