SPIGOT-2799: ItemFrame set null error

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2016-11-19 20:28:04 +11:00
parent 0816d8a06f
commit c8c4604bfd

View file

@ -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() {