mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-03 13:36:44 +01:00
getContents now returns null for items whose underlying item is null
This commit is contained in:
parent
8385b1436e
commit
92e3957a0e
1 changed files with 1 additions and 1 deletions
|
@ -35,7 +35,7 @@ public class CraftInventory implements org.bukkit.inventory.Inventory {
|
||||||
net.minecraft.server.ItemStack[] mcItems = getInventory().getContents();
|
net.minecraft.server.ItemStack[] mcItems = getInventory().getContents();
|
||||||
|
|
||||||
for (int i = 0; i < mcItems.length; i++ ) {
|
for (int i = 0; i < mcItems.length; i++ ) {
|
||||||
items[i] = new CraftItemStack(mcItems[i]);
|
items[i] = mcItems[i] == null ? null : new CraftItemStack(mcItems[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return items;
|
return items;
|
||||||
|
|
Loading…
Reference in a new issue