mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-23 16:56:31 +01:00
Accounted for NMS getItem() returning null in recent commit.
By: EvilSeph <evilseph@gmail.com>
This commit is contained in:
parent
d8ad13e979
commit
5d0878be04
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ public class CraftInventory implements org.bukkit.inventory.Inventory {
|
|||
}
|
||||
|
||||
public ItemStack getItem(int index) {
|
||||
return getInventory().getItem(index).id == 0 ? null : new CraftItemStack(getInventory().getItem(index));
|
||||
return (getInventory().getItem(index) == null || getInventory().getItem(index).id == 0) ? null : new CraftItemStack(getInventory().getItem(index));
|
||||
}
|
||||
|
||||
public ItemStack[] getContents() {
|
||||
|
|
Loading…
Add table
Reference in a new issue