mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 12:13:54 -07:00
getContents now returns null for items whose underlying item is null
This commit is contained in:
@@ -35,7 +35,7 @@ public class CraftInventory implements org.bukkit.inventory.Inventory {
|
||||
net.minecraft.server.ItemStack[] mcItems = getInventory().getContents();
|
||||
|
||||
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;
|
||||
|
Reference in New Issue
Block a user