Archiviert
13
0

SPIGOT-2799: ItemFrame set null error

Dieser Commit ist enthalten in:
md_5 2016-11-19 20:28:04 +11:00
Ursprung 89e6712cde
Commit 092243c35d

Datei anzeigen

@ -47,14 +47,9 @@ public class CraftItemFrame extends CraftHanging implements ItemFrame {
this.entity = frame; this.entity = frame;
} }
public void setItem(org.bukkit.inventory.ItemStack item) { 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() { public org.bukkit.inventory.ItemStack getItem() {
return CraftItemStack.asBukkitCopy(getHandle().getItem()); return CraftItemStack.asBukkitCopy(getHandle().getItem());