Пример #1
0
 @EventHandler(priority = EventPriority.MONITOR)
 public void onPluginDisable(PluginDisableEvent event) {
   if (economy.economy != null) {
     if (event.getPlugin().getDescription().getName().equals("MultiCurrency")) {
       economy.economy = null;
       log.info(
           String.format(
               "[%s][Economy] %s unhooked.", plugin.getDescription().getName(), economy.name));
     }
   }
 }
Пример #2
0
    @EventHandler(priority = EventPriority.MONITOR)
    public void onPluginEnable(PluginEnableEvent event) {
      if (economy.economy == null) {
        Plugin mcur = plugin.getServer().getPluginManager().getPlugin("MultiCurrency");

        if (mcur != null) {
          economy.economy = (Currency) mcur;
          log.info(
              String.format(
                  "[%s][Economy] %s hooked.", plugin.getDescription().getName(), economy.name));
        }
      }
    }