mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
Fixed error in CraftInventory.setContents().
This commit is contained in:
1 parent
d048167d16
commit
74d746b6c5
1 file changed
+1
-1
@@ -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());
|
||||
|
||||
Reference in new issue
Block a user