summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignFree.java10
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;
}