mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 04:56:50 +01:00
Fixed error in CraftInventory.setContents().
This commit is contained in:
parent
d048167d16
commit
74d746b6c5
1 changed files with 1 additions and 1 deletions
|
@ -50,7 +50,7 @@ public class CraftInventory implements org.bukkit.inventory.Inventory {
|
||||||
|
|
||||||
for (int i = 0; i < items.length; i++ ) {
|
for (int i = 0; i < items.length; i++ ) {
|
||||||
ItemStack item = items[i];
|
ItemStack item = items[i];
|
||||||
if (item == null) {
|
if (item == null || item.getTypeId() <= 0) {
|
||||||
mcItems[i] = null;
|
mcItems[i] = null;
|
||||||
} else {
|
} else {
|
||||||
mcItems[i] = new net.minecraft.server.ItemStack( item.getTypeId(), item.getAmount(), item.getDamage());
|
mcItems[i] = new net.minecraft.server.ItemStack( item.getTypeId(), item.getAmount(), item.getDamage());
|
||||||
|
|
Loading…
Reference in a new issue