Exemplo n.º 1
0
 @EventHandler(priority = EventPriority.MONITOR)
 public void onPluginDisable(PluginDisableEvent event) {
   if (economy.economy != null) {
     if (event.getPlugin().getDescription().getName().equals("Craftconomy3")) {
       economy.economy = null;
       log.info(
           String.format(
               "[%s][Economy] %s unhooked.", plugin.getDescription().getName(), economy.name));
     }
   }
 }
Exemplo n.º 2
0
    @EventHandler(priority = EventPriority.MONITOR)
    public void onPluginEnable(PluginEnableEvent event) {
      if (economy.economy == null) {
        Plugin ec = plugin.getServer().getPluginManager().getPlugin("Craftconomy3");

        if (ec != null
            && ec.getClass().getName().equals("com.greatmancode.craftconomy3.BukkitLoader")) {
          economy.economy = (BukkitLoader) ec;
          log.info(
              String.format(
                  "[%s][Economy] %s hooked.", plugin.getDescription().getName(), economy.name));
        }
      }
    }