mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-18 15:20:37 +01:00
SPIGOT-7115: Support hex color codes in custom merchant inventory titles
By: blablubbabc <lukas@wirsindwir.de>
This commit is contained in:
parent
c739d45f4b
commit
0424133c43
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue