mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-04-26 00:19:43 +00:00
Fix duplicated logger messages in GM after reload
This commit is contained in:
parent
e805d1047f
commit
3b59dd0b02
1 changed files with 3 additions and 1 deletions
|
@ -48,6 +48,7 @@ public class GroupManager extends JavaPlugin {
|
|||
private boolean validateOnlinePlayer = true;
|
||||
private boolean isReady = false;
|
||||
private GMConfiguration config;
|
||||
private GMLoggerHandler ch;
|
||||
public static final Logger logger = Logger.getLogger(GroupManager.class.getName());
|
||||
|
||||
@Override
|
||||
|
@ -59,12 +60,13 @@ public class GroupManager extends JavaPlugin {
|
|||
// EXAMPLE: Custom code, here we just output some info so we can check all is well
|
||||
PluginDescriptionFile pdfFile = this.getDescription();
|
||||
System.out.println(pdfFile.getName() + " version " + pdfFile.getVersion() + " is disabled!");
|
||||
GroupManager.logger.removeHandler(ch);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
GroupManager.logger.setUseParentHandlers(false);
|
||||
GMLoggerHandler ch = new GMLoggerHandler();
|
||||
ch = new GMLoggerHandler();
|
||||
GroupManager.logger.addHandler(ch);
|
||||
logger.setLevel(Level.ALL);
|
||||
if (worldsHolder == null) {
|
||||
|
|
Loading…
Reference in a new issue