示例#1
0
  public boolean isCompatible(Plugin plugin) {
    try {
      Class.forName("com.iCo6.IO");
    } catch (Exception e) {
      return false;
    }

    return plugin.getDescription().getName().equalsIgnoreCase("iconomy")
        && plugin.getClass().getName().equals("com.iCo6.iConomy")
        && plugin instanceof iConomy;
  }
示例#2
0
    @EventHandler()
    public void onPluginEnable(PluginEnableEvent event) {
      if (eco.eco == null) {
        Plugin ecoEn = plugin.getServer().getPluginManager().getPlugin("iConomy");

        if (ecoEn != null
            && ecoEn.isEnabled()
            && ecoEn.getClass().getName().equals("com.nijiko.coelho.iConomy.iConomy.class")) {
          eco.eco = (iConomy) ecoEn;
          plugin.getLogger().log(Level.INFO, "Succesfully hooked into iConomy 4!");
        }
      }
    }
示例#3
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.");
        }
      }
    }
  }
示例#4
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));
        }
      }
    }
示例#5
0
  @Override
  public void onPluginEnable(PluginEnableEvent event) {
    // if 3co is null, get the plugin 3co and if that isn't null let the log know about it, and set
    // the plugin.eco variable to the plugin 3co
    if (plugin.eco == null) {
      Plugin eco = plugin.getServer().getPluginManager().getPlugin("3co");

      if (eco != null) {
        if (eco.isEnabled() && eco.getClass().getName().equals("me.ic3d.eco.ECO")) {
          plugin.eco = (ECO) eco;
          System.out.println("[3coShop] 3co found, hooking in!");
        }
      }
    }
  }
示例#6
0
  public ic4_Engine(BlackSmith plugin) {
    this.plugin = plugin;
    Bukkit.getServer().getPluginManager().registerEvents(new EcoListener(this), plugin);
    plugin.getLogger().log(Level.WARNING, "iConomy 4 is HEAVILY outdated please upgrade!");
    if (eco == null) {
      Plugin ecoEn = plugin.getServer().getPluginManager().getPlugin("iConomy");

      if (ecoEn != null
          && ecoEn.isEnabled()
          && ecoEn.getClass().getName().equals("com.nijiko.coelho.iConomy.iConomy.class")) {
        eco = (iConomy) ecoEn;
        plugin.getLogger().log(Level.INFO, "Succesfully hooked into iConomy 4!");
      }
    }
  }
示例#7
0
  public Economy_Craftconomy3(Plugin plugin) {
    this.plugin = plugin;
    Bukkit.getServer().getPluginManager().registerEvents(new EconomyServerListener(this), plugin);

    // Load Plugin in case it was loaded before
    if (economy == null) {
      Plugin ec = plugin.getServer().getPluginManager().getPlugin("Craftconomy3");
      if (ec != null
          && ec.isEnabled()
          && ec.getClass().getName().equals("com.greatmancode.craftconomy3.BukkitLoader")) {
        economy = (BukkitLoader) ec;
        log.info(
            String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), name));
      }
    }
  }
示例#8
0
 public boolean isCompatible(Plugin plugin) {
   return (plugin.getDescription().getName().equalsIgnoreCase("iconomy"))
       && (plugin.getClass().getName().equals("com.nijiko.coelho.iConomy.iConomy"))
       && ((plugin instanceof iConomy));
 }