diff options
author | KHobbits <rob@khobbits.co.uk> | 2012-03-23 20:15:03 +0000 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2012-03-23 20:15:03 +0000 |
commit | 2975053b612ef7c4820e0539dab915f65fa4bc8e (patch) | |
tree | ca2db6598e6e0b705aba0cfaae8f0f25407b8ba1 | |
parent | c793fc13a73c300ec48aa59b1bb0ca25c52062e3 (diff) | |
download | Essentials-2975053b612ef7c4820e0539dab915f65fa4bc8e.tar Essentials-2975053b612ef7c4820e0539dab915f65fa4bc8e.tar.gz Essentials-2975053b612ef7c4820e0539dab915f65fa4bc8e.tar.lz Essentials-2975053b612ef7c4820e0539dab915f65fa4bc8e.tar.xz Essentials-2975053b612ef7c4820e0539dab915f65fa4bc8e.zip |
Make sure items don't stack wrong in [free] signs.
-rw-r--r-- | Essentials/src/com/earth2me/essentials/signs/SignFree.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignFree.java b/Essentials/src/com/earth2me/essentials/signs/SignFree.java index 52e2b9540..24ce481ff 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignFree.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignFree.java @@ -34,10 +34,12 @@ public class SignFree extends EssentialsSign throw new SignException(_("cantSpawnItem", "Air")); } - item.setAmount(item.getType().getMaxStackSize() * 36); - Inventory i = ess.getServer().createInventory(player, 36); - i.addItem(item); - player.openInventory(i); + item.setAmount(item.getType().getMaxStackSize()); + Inventory invent = ess.getServer().createInventory(player, 36); + for (int i = 0; i < 36; i++) { + invent.addItem(item); + } + player.openInventory(invent); Trade.log("Sign", "Free", "Interact", username, null, username, new Trade(item, ess), sign.getBlock().getLocation(), ess); return true; } |