mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2025-09-18 21:54:50 +00:00
Use max inventory size for new stack. Fixes BUKKIT-3240
This commit is contained in:
parent
708252c020
commit
b870755edb
1 changed files with 1 additions and 0 deletions
|
@ -290,6 +290,7 @@ public class CraftInventory implements Inventory {
|
||||||
// More than a single stack!
|
// More than a single stack!
|
||||||
if (item.getAmount() > getMaxItemStack()) {
|
if (item.getAmount() > getMaxItemStack()) {
|
||||||
CraftItemStack stack = CraftItemStack.asCraftCopy(item);
|
CraftItemStack stack = CraftItemStack.asCraftCopy(item);
|
||||||
|
stack.setAmount(getMaxItemStack());
|
||||||
setItem(firstFree, stack);
|
setItem(firstFree, stack);
|
||||||
item.setAmount(item.getAmount() - getMaxItemStack());
|
item.setAmount(item.getAmount() - getMaxItemStack());
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue