From f69095731175a8d77f6c6f973721fa9a7182ff5d Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 15 May 2019 17:07:47 +1000 Subject: [PATCH] SPIGOT-4935: Lore deserializes incorrectly from previous versions --- .../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 e09ecd58a1..2a513bd96f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -664,14 +664,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } } - static NBTTagList createStringList(List list) { + NBTTagList createStringList(List list) { if (list == null || list.isEmpty()) { return null; } NBTTagList tagList = new NBTTagList(); for (IChatBaseComponent value : list) { - tagList.add(new NBTTagString(CraftChatMessage.toJSON(value))); + tagList.add(new NBTTagString(version >= 1803 ? CraftChatMessage.toJSON(value) : CraftChatMessage.fromComponent(value, EnumChatFormat.DARK_PURPLE))); // SPIGOT-4935 } return tagList;