diff --git a/src/main/java/me/chayapak1/chomens_bot/commands/ConsoleCommand.java b/src/main/java/me/chayapak1/chomens_bot/commands/ConsoleCommand.java index 6c760d5..a8f7972 100644 --- a/src/main/java/me/chayapak1/chomens_bot/commands/ConsoleCommand.java +++ b/src/main/java/me/chayapak1/chomens_bot/commands/ConsoleCommand.java @@ -48,8 +48,6 @@ public class ConsoleCommand extends Command { if (server.equalsIgnoreCase("all")) { eachBot.console.consoleServer = "all"; - context.sendOutput(Component.text("Set the console server to all servers").color(ColorUtilities.getColorByString(bot.config.colorPalette.defaultColor))); - continue; } @@ -59,8 +57,6 @@ public class ConsoleCommand extends Command { .filter(eachServer -> eachServer.toLowerCase().contains(server)) .findFirst() .orElse("all"); - - context.sendOutput(Component.text("Set the console server to " + bot.console.consoleServer).color(ColorUtilities.getColorByString(bot.config.colorPalette.defaultColor))); } catch (ArrayIndexOutOfBoundsException e) { throw new CommandException(Component.text("Invalid server: " + server)); } diff --git a/src/main/java/me/chayapak1/chomens_bot/util/LoggerUtilities.java b/src/main/java/me/chayapak1/chomens_bot/util/LoggerUtilities.java index 2dfb9da..856257c 100644 --- a/src/main/java/me/chayapak1/chomens_bot/util/LoggerUtilities.java +++ b/src/main/java/me/chayapak1/chomens_bot/util/LoggerUtilities.java @@ -38,6 +38,8 @@ public class LoggerUtilities { } public static void log (String message) { log(null, message, true, true); } + public static void log (Component message) { log(null, ComponentUtilities.stringifyAnsi(message)); } + public static void log (Bot bot, Component message) { log(bot, ComponentUtilities.stringifyAnsi(message)); } public static void log (Bot bot, String message) { log(bot, message, true, true); } public static void log (Bot bot, String message, boolean logToFile, boolean logToConsole) { final String component = prefix(bot, Component.text("Log").color(NamedTextColor.GOLD), message); @@ -58,6 +60,8 @@ public class LoggerUtilities { } public static void info (String message) { info(null, message); } + public static void info (Component message) { info(null, ComponentUtilities.stringifyAnsi(message)); } + public static void info (Bot bot, Component message) { info(bot, ComponentUtilities.stringifyAnsi(message)); } public static void info (Bot bot, String message) { final String component = prefix(bot, Component.text("Info").color(NamedTextColor.GREEN), message); @@ -66,6 +70,8 @@ public class LoggerUtilities { } public static void error (String message) { error(null, message); } + public static void error (Component message) { error(null, ComponentUtilities.stringifyAnsi(message)); } + public static void error (Bot bot, Component message) { error(bot, ComponentUtilities.stringifyAnsi(message)); } public static void error (Bot bot, String message) { final String component = prefix(bot, Component.text("Error").color(NamedTextColor.RED), message);