Esempio n. 1
0
  @EventHandler(priority = EventPriority.MONITOR)
  public void onPluginEnable(final PluginEnableEvent event) {
    if (plugin.iConomy == null) {
      Plugin iConomy = plugin.getServer().getPluginManager().getPlugin("iConomy");

      if (iConomy != null) {
        if (iConomy.isEnabled() && iConomy.getClass().getName().equals("com.iConomy.iConomy")) {
          plugin.iConomy = (iConomy) iConomy;
          System.out.println("[MyPlugin] hooked into iConomy.");
        }
      }
    }
  }
Esempio n. 2
0
 public server(Core plugin) {
   this.plugin = plugin;
   plugin.getServer().getPluginManager().registerEvents(this, plugin);
 }