예제 #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));
        }
      }
    }