mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-09 20:20:11 +01:00
Log reloading the config to console always and if activated to file too.
This commit is contained in:
parent
7a1308e996
commit
26b4eb1458
@ -5,6 +5,7 @@ import java.util.Collection;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.ConsoleCommandSender;
|
||||
|
||||
import fr.neatmonster.nocheatplus.NoCheatPlus;
|
||||
import fr.neatmonster.nocheatplus.checks.blockbreak.BlockBreakConfig;
|
||||
@ -18,8 +19,11 @@ import fr.neatmonster.nocheatplus.checks.moving.MovingConfig;
|
||||
import fr.neatmonster.nocheatplus.command.CommandHandler.NCPReloadEvent;
|
||||
import fr.neatmonster.nocheatplus.command.INotifyReload;
|
||||
import fr.neatmonster.nocheatplus.command.NCPCommand;
|
||||
import fr.neatmonster.nocheatplus.config.ConfPaths;
|
||||
import fr.neatmonster.nocheatplus.config.ConfigFile;
|
||||
import fr.neatmonster.nocheatplus.config.ConfigManager;
|
||||
import fr.neatmonster.nocheatplus.players.Permissions;
|
||||
import fr.neatmonster.nocheatplus.utilities.CheckUtils;
|
||||
|
||||
public class ReloadCommand extends NCPCommand {
|
||||
|
||||
@ -70,6 +74,10 @@ public class ReloadCommand extends NCPCommand {
|
||||
Bukkit.getPluginManager().callEvent(new NCPReloadEvent());
|
||||
|
||||
sender.sendMessage(TAG + "Configuration reloaded!");
|
||||
final String info = "[NoCheatPlus] Configuration reloaded.";
|
||||
if (!(sender instanceof ConsoleCommandSender)) Bukkit.getLogger().info(info);
|
||||
final ConfigFile config = ConfigManager.getConfigFile();
|
||||
if (config.getBoolean(ConfPaths.LOGGING_ACTIVE) && config.getBoolean(ConfPaths.LOGGING_FILE)) CheckUtils.fileLogger.info(info);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user