This commit is contained in:
Chayapak 2023-07-16 15:01:32 +07:00
parent 01c19ad4bd
commit 324ae6a13f
2 changed files with 7 additions and 1 deletions

View file

@ -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;

View file

@ -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); }