Browse Source

Fixed exploit involving Call of The Wild. Fixes #1877

GJ 11 years ago
parent
commit
d0b0786284
2 changed files with 2 additions and 1 deletions
  1. 1 0
      Changelog.txt
  2. 1 1
      src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java

+ 1 - 0
Changelog.txt

@@ -21,6 +21,7 @@ Version 1.4.08-dev
  + Added new experience bonus perk 'mcmmo.perks.xp.customboost.<skillname>' multiplies incoming XP by the boost amount defined in the experience config
  + Added Ender Dragon, Wither, and Witch to combat experience multipliers - they do not give XP by default
  + Added support for multiple mod config files, naming can be done as either armor.<modname>.yml or <modname>.armor.yml
+ = Fixed exploit involving Call of The Wild.
  = Fixed bug where LeafBlower permissions were ignored
  = Fixed bug with toggle commands not properly displaying the success message.
  = Fixed IllegalArgumentException caused by an empty Fishing treasure category

+ 1 - 1
src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java

@@ -260,7 +260,7 @@ public class TamingManager extends SkillManager {
             }
         }
 
-        player.setItemInHand(new ItemStack(heldItem.getType(), heldItemAmount - summonAmount));
+        player.setItemInHand(heldItemAmount == summonAmount ? null : new ItemStack(heldItem.getType(), heldItemAmount - summonAmount));
         player.sendMessage(LocaleLoader.getString("Taming.Summon.Complete"));
     }