diff options
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java index ff7ec7e2..c9933be3 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -566,7 +566,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { } public final void setDisplayName(String name) { - this.displayName = new ChatComponentText(name); + this.displayName = (name == null) ? null : new ChatComponentText(name); } public boolean hasDisplayName() { @@ -580,7 +580,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { @Override public void setLocalizedName(String name) { - this.locName = new ChatComponentText(name); + this.locName = (name == null) ? null : new ChatComponentText(name); } @Override |