mirror of
https://github.com/aikar/commands.git
synced 2026-05-31 06:11:55 +00:00
Use legacyAmpersand method for componentserializer
This commit is contained in:
@@ -15,9 +15,8 @@ import java.util.stream.Collectors;
|
||||
|
||||
public class ACFVelocityUtil {
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static TextComponent color(String message) {
|
||||
return LegacyComponentSerializer.legacy('&').deserialize(message);
|
||||
return LegacyComponentSerializer.legacyAmpersand().deserialize(message);
|
||||
}
|
||||
|
||||
public static Player findPlayerSmart(ProxyServer server, CommandIssuer issuer, String search) {
|
||||
|
||||
@@ -10,8 +10,7 @@ public class VelocityMessageFormatter extends MessageFormatter<TextColor> {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
String format(TextColor color, String message) {
|
||||
return LegacyComponentSerializer.legacy('&').serialize(LegacyComponentSerializer.legacy('&').deserialize(message).color(color));
|
||||
return LegacyComponentSerializer.legacyAmpersand().serialize(LegacyComponentSerializer.legacy('&').deserialize(message).color(color));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user