From 4120ca9bd7befa4134e1a76c46046f8b480d1aa2 Mon Sep 17 00:00:00 2001 From: asofold Date: Fri, 9 Nov 2012 14:46:56 +0100 Subject: [PATCH] LogAction: no longer check the config file for flags. The optimized actions will have done that beforehand. --- .../nocheatplus/actions/types/LogAction.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/fr/neatmonster/nocheatplus/actions/types/LogAction.java b/src/fr/neatmonster/nocheatplus/actions/types/LogAction.java index d0477940..24d34717 100644 --- a/src/fr/neatmonster/nocheatplus/actions/types/LogAction.java +++ b/src/fr/neatmonster/nocheatplus/actions/types/LogAction.java @@ -7,7 +7,6 @@ import fr.neatmonster.nocheatplus.actions.Action; import fr.neatmonster.nocheatplus.checks.ViolationData; import fr.neatmonster.nocheatplus.config.ConfPaths; import fr.neatmonster.nocheatplus.config.ConfigFile; -import fr.neatmonster.nocheatplus.config.ConfigManager; import fr.neatmonster.nocheatplus.utilities.CheckUtils; import fr.neatmonster.nocheatplus.utilities.LogUtil; @@ -71,14 +70,11 @@ public class LogAction extends ActionWithParameters { */ @Override public boolean execute(final ViolationData violationData) { - final ConfigFile configurationFile = ConfigManager.getConfigFile(); - if (configurationFile.getBoolean(ConfPaths.LOGGING_ACTIVE) && !violationData.player.hasPermission(violationData.getPermissionSilent())) { + if (!violationData.player.hasPermission(violationData.getPermissionSilent())) { final String message = super.getMessage(violationData); - if (toChat && configurationFile.getBoolean(ConfPaths.LOGGING_INGAMECHAT)) { - NoCheatPlus.sendAdminNotifyMessage(ChatColor.RED + "NCP: " + ChatColor.WHITE + CheckUtils.replaceColors(message)); - } - if (toConsole && configurationFile.getBoolean(ConfPaths.LOGGING_CONSOLE)) LogUtil.logInfo("[NoCheatPlus] " + CheckUtils.removeColors(message)); - if (toFile && configurationFile.getBoolean(ConfPaths.LOGGING_FILE)) CheckUtils.fileLogger.info(CheckUtils.removeColors(message)); + if (toChat) NoCheatPlus.sendAdminNotifyMessage(ChatColor.RED + "NCP: " + ChatColor.WHITE + CheckUtils.replaceColors(message)); + if (toConsole) LogUtil.logInfo("[NoCheatPlus] " + CheckUtils.removeColors(message)); + if (toFile) CheckUtils.fileLogger.info(CheckUtils.removeColors(message)); } return false; }