001package co.aikar.commands; 002 003import net.kyori.adventure.text.format.NamedTextColor; 004import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; 005 006public class VelocityMessageFormatter extends MessageFormatter<NamedTextColor> { 007 008 public VelocityMessageFormatter(NamedTextColor... colors) { 009 super(colors); 010 } 011 012 @Override 013 String format(NamedTextColor color, String message) { 014 return LegacyComponentSerializer.legacySection().serialize(LegacyComponentSerializer.legacySection().deserialize(message).color(color)); 015 } 016}