Only interaction with the jail stick manager when enabled. Closes #30
This commit is contained in:
@ -105,13 +105,10 @@ public class JailMain extends JavaPlugin {
|
||||
plm.registerEvents(this.mpl, this);
|
||||
}
|
||||
|
||||
if(getConfig().getBoolean(Settings.JAILSTICKENABLED.getPath())) {
|
||||
jsm = new JailStickManager(this);
|
||||
}
|
||||
|
||||
jt = new JailTimer(this);
|
||||
sbm = new ScoreBoardManager(this);
|
||||
reloadJailPayManager();
|
||||
reloadJailSticks();
|
||||
reloadUpdateCheck();
|
||||
|
||||
new JailsAPI(this);
|
||||
@ -201,8 +198,11 @@ public class JailMain extends JavaPlugin {
|
||||
/** Reloads the Jail Sticks, so the new ones can be loaded from the config. */
|
||||
public void reloadJailSticks() {
|
||||
if(getConfig().getBoolean(Settings.JAILSTICKENABLED.getPath())) {
|
||||
this.jsm.removeAllStickUsers();
|
||||
this.jsm = null;
|
||||
if(this.jsm != null) {
|
||||
this.jsm.removeAllStickUsers();
|
||||
this.jsm = null;
|
||||
}
|
||||
|
||||
this.jsm = new JailStickManager(this);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user