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