mirror of
https://github.com/essentials/Essentials.git
synced 2025-01-17 21:39:26 +01:00
Fix duplicated logger messages in GM after reload
This commit is contained in:
parent
625164dac2
commit
17ba7e2a3d
@ -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…
x
Reference in New Issue
Block a user