001package co.aikar.commands; 002 003import net.kyori.text.format.TextColor; 004import net.kyori.text.serializer.legacy.LegacyComponentSerializer; 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 LegacyComponentSerializer.legacy().serialize(LegacyComponentSerializer.legacy().deserialize(message).color(color)); 016 } 017}