From cfeef75cd979c5d2b408645909325a055376c520 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 26 May 2020 19:39:03 +1000 Subject: [PATCH] SPIGOT-5749: ItemMeta serializing to YAML not saving black colour code --- .../org/bukkit/craftbukkit/inventory/CraftMetaItem.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java index eedb8d4052..aa34e7af14 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -1219,14 +1219,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Overridden ImmutableMap.Builder serialize(ImmutableMap.Builder builder) { if (hasDisplayName()) { - builder.put(NAME.BUKKIT, CraftChatMessage.fromComponent(displayName)); + builder.put(NAME.BUKKIT, CraftChatMessage.fromComponent(displayName, EnumChatFormat.WHITE)); } if (hasLocalizedName()) { - builder.put(LOCNAME.BUKKIT, CraftChatMessage.fromComponent(locName)); + builder.put(LOCNAME.BUKKIT, CraftChatMessage.fromComponent(locName, EnumChatFormat.WHITE)); } if (hasLore()) { - builder.put(LORE.BUKKIT, ImmutableList.copyOf(Lists.transform(lore, CraftChatMessage::fromComponent))); + builder.put(LORE.BUKKIT, ImmutableList.copyOf(Lists.transform(lore, (line) -> CraftChatMessage.fromComponent(line, EnumChatFormat.DARK_PURPLE)))); } if (hasCustomModelData()) {