From 0424133c43e9e2e144ff03ed2e85da6363c54755 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Mon, 25 Jul 2022 18:00:55 +1000 Subject: [PATCH] SPIGOT-7115: Support hex color codes in custom merchant inventory titles By: blablubbabc --- .../org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java index 4ef874dfd1..775f3087ee 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java @@ -10,6 +10,7 @@ import net.minecraft.world.item.trading.MerchantRecipe; import net.minecraft.world.item.trading.MerchantRecipeList; import net.minecraft.world.level.World; import org.apache.commons.lang.Validate; +import org.bukkit.craftbukkit.util.CraftChatMessage; public class CraftMerchantCustom extends CraftMerchant { @@ -38,7 +39,7 @@ public class CraftMerchantCustom extends CraftMerchant { public MinecraftMerchant(String title) { Validate.notNull(title, "Title cannot be null"); - this.title = IChatBaseComponent.literal(title); + this.title = CraftChatMessage.fromString(title)[0]; } @Override