Kaynağa Gözat

Fixed Fishing treasures always having the same enchants.

GJ 12 yıl önce
ebeveyn
işleme
42a30b4521

+ 1 - 0
Changelog.txt

@@ -22,6 +22,7 @@ Version 1.4.06-dev
  = Fixed bug where experience commands were adding levels to all skills when they shouldn't
  = Fixed bug where experience commands were adding levels to all skills when they shouldn't
  = Fixed mcmmo.commands.ptp.send not being set by default
  = Fixed mcmmo.commands.ptp.send not being set by default
  = Fixed NPE when trying to tab-complete /mctop
  = Fixed NPE when trying to tab-complete /mctop
+ = Fixed Fishing treasures always having the same enchants
  ! Changed Berserk to add items to inventory rather than denying pickup
  ! Changed Berserk to add items to inventory rather than denying pickup
  ! Changed Chimaera Wing's recipe result to use the ingredient Material
  ! Changed Chimaera Wing's recipe result to use the ingredient Material
  ! Players will no longer pickup items to their hotbar while using Unarmed
  ! Players will no longer pickup items to their hotbar while using Unarmed

+ 1 - 1
src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java

@@ -112,7 +112,7 @@ public class FishingManager extends SkillManager {
             player.sendMessage(LocaleLoader.getString("Fishing.ItemFound"));
             player.sendMessage(LocaleLoader.getString("Fishing.ItemFound"));
 
 
             treasureXp = treasure.getXp();
             treasureXp = treasure.getXp();
-            ItemStack treasureDrop = treasure.getDrop();
+            ItemStack treasureDrop = treasure.getDrop().clone(); // Not cloning is bad, m'kay?
 
 
             if (Permissions.magicHunter(player) && ItemUtils.isEnchantable(treasureDrop) && handleMagicHunter(treasureDrop)) {
             if (Permissions.magicHunter(player) && ItemUtils.isEnchantable(treasureDrop) && handleMagicHunter(treasureDrop)) {
                 player.sendMessage(LocaleLoader.getString("Fishing.MagicFound"));
                 player.sendMessage(LocaleLoader.getString("Fishing.MagicFound"));