SPIGOT-7115: Support hex color codes in custom merchant inventory titles

By: blablubbabc <lukas@wirsindwir.de>
This commit is contained in:
CraftBukkit/Spigot 2022-07-25 18:00:55 +10:00
parent c739d45f4b
commit 0424133c43

View file

@ -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