Exemplo n.º 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;
  }
Exemplo n.º 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!");
        }
      }
    }
Exemplo n.º 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.");
        }
      }
    }
  }
Exemplo n.º 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));
        }
      }
    }
Exemplo n.º 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!");
        }
      }
    }
  }
Exemplo n.º 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!");
      }
    }
  }
Exemplo n.º 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));
      }
    }
  }
Exemplo n.º 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));
 }