mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-04 22:14:40 +01:00
SPIGOT-5749: ItemMeta serializing to YAML not saving black colour code
This commit is contained in:
parent
eb1b19d979
commit
cfeef75cd9
1 changed files with 3 additions and 3 deletions
|
@ -1219,14 +1219,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
@Overridden
|
@Overridden
|
||||||
ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
|
ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
|
||||||
if (hasDisplayName()) {
|
if (hasDisplayName()) {
|
||||||
builder.put(NAME.BUKKIT, CraftChatMessage.fromComponent(displayName));
|
builder.put(NAME.BUKKIT, CraftChatMessage.fromComponent(displayName, EnumChatFormat.WHITE));
|
||||||
}
|
}
|
||||||
if (hasLocalizedName()) {
|
if (hasLocalizedName()) {
|
||||||
builder.put(LOCNAME.BUKKIT, CraftChatMessage.fromComponent(locName));
|
builder.put(LOCNAME.BUKKIT, CraftChatMessage.fromComponent(locName, EnumChatFormat.WHITE));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasLore()) {
|
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()) {
|
if (hasCustomModelData()) {
|
||||||
|
|
Loading…
Reference in a new issue