mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-30 14:03:21 +01:00
Fix NPE that occurs when STACK_TO_64 is true (DevBukkit-1222)
This commit is contained in:
parent
0413f24e64
commit
9a9e89206b
@ -153,7 +153,9 @@ public class InventoryUtil {
|
|||||||
ItemStack currentItem = inventory.getItem(currentSlot);
|
ItemStack currentItem = inventory.getItem(currentSlot);
|
||||||
|
|
||||||
if (MaterialUtil.isEmpty(currentItem)) {
|
if (MaterialUtil.isEmpty(currentItem)) {
|
||||||
|
currentItem = new ItemStack(item);
|
||||||
currentItem.setAmount(Math.min(amountLeft, maxStackSize));
|
currentItem.setAmount(Math.min(amountLeft, maxStackSize));
|
||||||
|
inventory.setItem(currentSlot, currentItem);
|
||||||
|
|
||||||
amountLeft -= currentItem.getAmount();
|
amountLeft -= currentItem.getAmount();
|
||||||
} else if (currentItem.getAmount() < maxStackSize && MaterialUtil.equals(currentItem, item)) {
|
} else if (currentItem.getAmount() < maxStackSize && MaterialUtil.equals(currentItem, item)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user