Esempio n. 1
0
 @EventHandler(priority = EventPriority.MONITOR)
 public void onPluginDisable(PluginDisableEvent event) {
   if (economy.economy != null) {
     if (event.getPlugin().getDescription().getName().equals("WorldEconomy")) {
       economy.economy = null;
       log.info(
           String.format(
               "[%s][Economy] %s unhooked.", plugin.getDescription().getName(), economy.name));
     }
   }
 }
Esempio n. 2
0
 @EventHandler(priority = EventPriority.MONITOR)
 public void onPluginEnable(PluginEnableEvent event) {
   if (economy.economy == null) {
     Plugin wecon = event.getPlugin();
     if (wecon.isEnabled() && wecon.getDescription().getName().equals("WorldEconomy")) {
       economy.economy = (WorldEconomyPlugin) wecon;
       log.info(
           String.format(
               "[%s][Economy] %s hooked.", plugin.getDescription().getName(), economy.name));
     }
   }
 }