From 324ae6a13fc74e56ae94e838eb0402351a051d5e Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Sun, 16 Jul 2023 15:01:32 +0700 Subject: [PATCH] i forgor --- .../chipmunk/chayapak/chomens_bot/plugins/LoggerPlugin.java | 6 ++++++ .../chipmunk/chayapak/chomens_bot/util/LoggerUtilities.java | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/LoggerPlugin.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/LoggerPlugin.java index 2911d74..1f15415 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/LoggerPlugin.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/LoggerPlugin.java @@ -65,6 +65,12 @@ public class LoggerPlugin extends ChatPlugin.Listener { LoggerUtilities.info(bot, message); } + public void error (String message) { + if (!logToConsole) return; + + LoggerUtilities.info(bot, message); + } + public void custom (Component prefix, Component message) { if (!logToConsole) return; diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/util/LoggerUtilities.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/util/LoggerUtilities.java index ecdc246..e972e15 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/util/LoggerUtilities.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/util/LoggerUtilities.java @@ -70,7 +70,7 @@ public class LoggerUtilities { final String component = prefix(bot, Component.text("Error").color(NamedTextColor.RED), message); if (bot != null) bot.console.reader.printAbove(component); - else System.out.println(component); + else System.err.println(component); } public static void custom (Component prefix, Component message) { custom(null, prefix, message); }