From 5830bf461deda4005e3f2a664bd21bd314e7ddf1 Mon Sep 17 00:00:00 2001 From: GJ Date: Thu, 17 Jan 2013 15:32:28 -0500 Subject: [PATCH] Fix fishing not handling enchants right. --- src/main/java/com/gmail/nossr50/skills/gathering/Fishing.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/skills/gathering/Fishing.java b/src/main/java/com/gmail/nossr50/skills/gathering/Fishing.java index 1e441d966..0e6f7dc4e 100755 --- a/src/main/java/com/gmail/nossr50/skills/gathering/Fishing.java +++ b/src/main/java/com/gmail/nossr50/skills/gathering/Fishing.java @@ -2,6 +2,7 @@ package com.gmail.nossr50.skills.gathering; import java.util.ArrayList; import java.util.List; +import java.util.Map; import org.bukkit.DyeColor; import org.bukkit.Location; @@ -164,9 +165,10 @@ public class Fishing { if (Misc.getRandom().nextInt(randomChance) <= (lootTier * magicHunterMultiplier) && Permissions.fishingMagic(player)) { for (Enchantment newEnchant : Enchantment.values()) { if (newEnchant.canEnchantItem(fishingResults)) { + Map resultEnchantments = fishingResults.getEnchantments(); specificChance++; - for (Enchantment oldEnchant : fishingResults.getEnchantments().keySet()) { + for (Enchantment oldEnchant : resultEnchantments.keySet()) { if (oldEnchant.conflictsWith(newEnchant)) specificChance--; continue;