Fixed Small NPE With Grace if GraceSystem was set to false

This commit is contained in:
Driftay
2020-04-09 17:53:05 -04:00
parent 861f88a916
commit 932a5768b0
2 changed files with 12 additions and 22 deletions

View File

@@ -295,13 +295,16 @@ public class FactionsPlugin extends MPlugin {
new MissionHandler(this),
new FChestListener(),
new MenuListener(),
timerManager.graceTimer,
new AntiChestListener()
};
for (Listener eventListener : eventsListener)
getServer().getPluginManager().registerEvents(eventListener, this);
if(Conf.useGraceSystem){
getServer().getPluginManager().registerEvents(timerManager.graceTimer, this);
}
this.getCommand(refCommand).setExecutor(cmdBase);
if (!CommodoreProvider.isSupported()) this.getCommand(refCommand).setTabCompleter(this);