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

This commit is contained in:
blablubbabc 2022-07-25 18:00:55 +10:00 committed by md_5
parent fc3071161c
commit 7550f6854e
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

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