Fix 1.12-1.15.2 not getting colored chat

This commit is contained in:
libraryaddict 2021-07-14 01:01:52 +12:00
parent 4b940bcd20
commit 5c9b4c3245

View File

@ -2498,20 +2498,11 @@ public class DisguiseUtilities {
} }
} }
@Deprecated
public static void sendMessage(CommandSender sender, LibsMsg msg, Object... args) { public static void sendMessage(CommandSender sender, LibsMsg msg, Object... args) {
if (!NmsVersion.v1_16.isSupported()) { BaseComponent[] components = msg.getChat(args);
String message = msg.get(args);
if (!message.isEmpty()) { if (components.length > 0) {
sender.sendMessage(message); sender.spigot().sendMessage(components);
}
} else {
BaseComponent[] components = msg.getChat(args);
if (components.length > 0) {
sender.spigot().sendMessage(components);
}
} }
} }