From 65bc676ed092501ce985d1c247d15b2853af84e1 Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 18 Jul 2018 17:39:04 +1000 Subject: [PATCH] SPIGOT-4041: Fix regressed item naming --- .../java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java | 4 ++-- 1 file 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 dfd6e66bff..c3e3bba25b 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -466,10 +466,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { @Overridden void applyToItem(NBTTagCompound itemTag) { if (hasDisplayName()) { - setDisplayTag(itemTag, NAME.NBT, new NBTTagString(CraftChatMessage.toJSON(displayName))); + setDisplayTag(itemTag, NAME.NBT, new NBTTagString(CraftChatMessage.fromComponent(displayName))); // SPIGOT-4041: Should be JSON, but we're still aggressively converting stacks & old+new are both valid } if (hasLocalizedName()){ - setDisplayTag(itemTag, LOCNAME.NBT, new NBTTagString(CraftChatMessage.toJSON(locName))); + setDisplayTag(itemTag, LOCNAME.NBT, new NBTTagString(CraftChatMessage.fromComponent(locName))); // SPIGOT-4041: Should be JSON, but we're still aggressively converting stacks & old+new are both valid } if (hasLore()) {