mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-19 13:38:44 +01:00
SPIGOT-2799: ItemFrame set null error
By: md_5 <git@md-5.net>
This commit is contained in:
parent
0816d8a06f
commit
c8c4604bfd
1 changed files with 1 additions and 6 deletions
|
@ -47,13 +47,8 @@ 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(CraftItemStack.asNMSCopy(item));
|
||||||
getHandle().setItem(null);
|
|
||||||
} else {
|
|
||||||
getHandle().setItem(CraftItemStack.asNMSCopy(item));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public org.bukkit.inventory.ItemStack getItem() {
|
public org.bukkit.inventory.ItemStack getItem() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue