From 092243c35d6b7a8743d4b7f3eedc821e46b79e3f Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 19 Nov 2016 20:28:04 +1100 Subject: [PATCH] SPIGOT-2799: ItemFrame set null error --- .../java/org/bukkit/craftbukkit/entity/CraftItemFrame.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java index d27f24f810..95647efc78 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java @@ -47,13 +47,8 @@ public class CraftItemFrame extends CraftHanging implements ItemFrame { this.entity = frame; } - public void setItem(org.bukkit.inventory.ItemStack item) { - if (item == null || item.getTypeId() == 0) { - getHandle().setItem(null); - } else { - getHandle().setItem(CraftItemStack.asNMSCopy(item)); - } + getHandle().setItem(CraftItemStack.asNMSCopy(item)); } public org.bukkit.inventory.ItemStack getItem() {