예제 #1
0
 public void onDisable() {
   // Unplugging of modules for safe exit
   for (String s : moduleManager.getModuleList().keySet()) {
     ModuleBase module = moduleManager.findModule(s);
     if (moduleManager.isEnabled(module)) {
       moduleManager.unplugModule(s, true);
     }
   }
   logger.info("DeathEssentials has been disabled");
 }
예제 #2
0
 public void onEnable() {
   this.saveDefaultConfig();
   logger = this.getLogger();
   new ModuleDependencies(this);
   moduleManager = new ModuleManager(this);
   setModuleList();
   // Initial plug of modules
   for (String s : moduleManager.getModuleList().keySet()) {
     if (moduleManager.getInitialStatus().containsKey(s)
         && moduleManager.getInitialStatus().get(s)) {
       moduleManager.plugModule(s);
     }
   }
   // Enable InternalCommands
   moduleManager.plugModule("InternalCommands");
   logger.info("DeathEssentials has been enabled");
 }
예제 #3
0
 /** @return List of modules with classes */
 public Map<String, ModuleBase> getModuleList() {
   return moduleManager.getModuleList();
 }