mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-16 04:21:37 +01:00
Fixed error in CraftInventory.setContents().
By: sk89q <the.sk89q@gmail.com>
This commit is contained in:
parent
ecc5a3be98
commit
bbc2093115
@ -50,7 +50,7 @@ public class CraftInventory implements org.bukkit.inventory.Inventory {
|
||||
|
||||
for (int i = 0; i < items.length; i++ ) {
|
||||
ItemStack item = items[i];
|
||||
if (item == null) {
|
||||
if (item == null || item.getTypeId() <= 0) {
|
||||
mcItems[i] = null;
|
||||
} else {
|
||||
mcItems[i] = new net.minecraft.server.ItemStack( item.getTypeId(), item.getAmount(), item.getDamage());
|
||||
|
Loading…
Reference in New Issue
Block a user