If command feedback is disabled, log it in the log lile

This commit is contained in:
Bella 2020-05-07 14:08:15 -04:00
parent cea3c69f13
commit f5f5bf7fac
No known key found for this signature in database
GPG Key ID: DBD4A6030080C8B3
1 changed files with 6 additions and 0 deletions

View File

@ -19,6 +19,8 @@ public class MessageSendHelper {
CommandConfig commandConfig = MODULE_MANAGER.getModuleT(CommandConfig.class);
if (commandConfig.logLevel.getValue().equals(CommandConfig.LogLevel.ALL)) {
sendRawChatMessage("&7[&9" + KamiMod.KAMI_KANJI + "&7] &r" + message);
} else {
KamiMod.log.info("&7[&9" + KamiMod.KAMI_KANJI + "&7] &r" + message);
}
}
@ -26,6 +28,8 @@ public class MessageSendHelper {
CommandConfig commandConfig = MODULE_MANAGER.getModuleT(CommandConfig.class);
if (commandConfig.logLevel.getValue().equals(CommandConfig.LogLevel.ALL) || commandConfig.logLevel.getValue().equals(CommandConfig.LogLevel.WARN)) {
sendRawChatMessage("&7[&6" + KamiMod.KAMI_KANJI + "&7] &r" + message);
} else {
KamiMod.log.warn("&7[&6" + KamiMod.KAMI_KANJI + "&7] &r" + message);
}
}
@ -33,6 +37,8 @@ public class MessageSendHelper {
CommandConfig commandConfig = MODULE_MANAGER.getModuleT(CommandConfig.class);
if (commandConfig.logLevel.getValue().equals(CommandConfig.LogLevel.ALL) || commandConfig.logLevel.getValue().equals(CommandConfig.LogLevel.WARN) || commandConfig.logLevel.getValue().equals(CommandConfig.LogLevel.ERROR)) {
sendRawChatMessage("&7[&4" + KamiMod.KAMI_KANJI + "&7] &r" + message);
} else {
KamiMod.log.error("&7[&4\" + KamiMod.KAMI_KANJI + \"&7] &r" + message);
}
}