@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)); } } }
@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)); } } }