SPIGOT-7389: Handle setting null items in ChiseledBookshelf Inventory
By: Doc <nachito94@msn.com>
This commit is contained in:
@@ -63,6 +63,15 @@
|
||||
this.items.clear();
|
||||
ContainerUtil.loadAllItems(nbttagcompound, this.items);
|
||||
this.lastInteractedSlot = nbttagcompound.getInt("last_interacted_slot");
|
||||
@@ -91,7 +134,7 @@
|
||||
|
||||
this.items.set(i, ItemStack.EMPTY);
|
||||
if (!itemstack.isEmpty()) {
|
||||
- this.updateState(i);
|
||||
+ if (level != null) this.updateState(i); // CraftBukkit - SPIGOT-7381: check for null world
|
||||
}
|
||||
|
||||
return itemstack;
|
||||
@@ -106,7 +149,7 @@
|
||||
public void setItem(int i, ItemStack itemstack) {
|
||||
if (itemstack.is(TagsItem.BOOKSHELF_BOOKS)) {
|
||||
|
||||
Reference in New Issue
Block a user