mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2025-03-14 23:39:04 +01:00
Fix the inventoryAdd bug.
This commit is contained in:
parent
6ad5d85349
commit
b1ca575404
@ -130,7 +130,7 @@ public class InventoryUtil {
|
||||
ItemStack duplicate = item.clone();
|
||||
|
||||
if (MaterialUtil.isEmpty(currentItem)) {
|
||||
duplicate.setAmount(Math.min(duplicate.getAmount(), maxStackSize));
|
||||
duplicate.setAmount(Math.min(amountLeft, maxStackSize));
|
||||
duplicate.addEnchantments(item.getEnchantments());
|
||||
|
||||
amountLeft -= duplicate.getAmount();
|
||||
|
Loading…
Reference in New Issue
Block a user