diff options
author | Wesley Wolfe <weswolf@aol.com> | 2012-12-21 11:10:23 -0600 |
---|---|---|
committer | Wesley Wolfe <weswolf@aol.com> | 2012-12-21 11:10:23 -0600 |
commit | b870755edb3d17c3609b9c7d53c084d920e47fa2 (patch) | |
tree | 142548385896ba4b2bef1dc64c7978d5d0ce30f3 /src/main/java/org | |
parent | 708252c020590de1c3a87ae628d56c05465a2167 (diff) | |
download | craftbukkit-b870755edb3d17c3609b9c7d53c084d920e47fa2.tar craftbukkit-b870755edb3d17c3609b9c7d53c084d920e47fa2.tar.gz craftbukkit-b870755edb3d17c3609b9c7d53c084d920e47fa2.tar.lz craftbukkit-b870755edb3d17c3609b9c7d53c084d920e47fa2.tar.xz craftbukkit-b870755edb3d17c3609b9c7d53c084d920e47fa2.zip |
Use max inventory size for new stack. Fixes BUKKIT-3240
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java index 280a2a5f..c2085a82 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java @@ -290,6 +290,7 @@ public class CraftInventory implements Inventory { // More than a single stack! if (item.getAmount() > getMaxItemStack()) { CraftItemStack stack = CraftItemStack.asCraftCopy(item); + stack.setAmount(getMaxItemStack()); setItem(firstFree, stack); item.setAmount(item.getAmount() - getMaxItemStack()); } else { |