Skip to content

Commit

Permalink
Possible bug fix: extra emerald in inventory.
Browse files Browse the repository at this point in the history
Yep.
  • Loading branch information
501st-alpha1 committed Nov 2, 2012
1 parent f2accb7 commit 32c069c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Binary file modified com/scott_weldon/xp_to_emerald/XPtoEmerald.class
Binary file not shown.
6 changes: 4 additions & 2 deletions com/scott_weldon/xp_to_emerald/XPtoEmerald.java
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,10 @@ public boolean emeraldToXP(Player player, int emeralds) {

int exp = player.getTotalExperience() + (emeralds * SCALE);
setTotalXP(player, exp);
inventory
.addItem(new ItemStack(Material.EMERALD, numOfEmeralds - emeralds));
if ((numOfEmeralds - emeralds) > 0) {
inventory.addItem(new ItemStack(Material.EMERALD, numOfEmeralds
- emeralds));
}

return true;
}
Expand Down

0 comments on commit 32c069c

Please sign in to comment.