SPIGOT-2799: ItemFrame set null error
Dieser Commit ist enthalten in:
Ursprung
89e6712cde
Commit
092243c35d
@ -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());
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren