mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-06 18:50:54 +01:00
LogAction: no longer check the config file for flags.
The optimized actions will have done that beforehand.
This commit is contained in:
parent
9f4896b47c
commit
4120ca9bd7
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user