Use max inventory size for new stack. Fixes BUKKIT-3240

This commit is contained in:
Wesley Wolfe 2012-12-21 11:10:23 -06:00
parent 708252c020
commit b870755edb

View File

@ -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 {