コード例 #1
0
 @EventHandler
 public void onPluginDisable(PluginDisableEvent e) {
   if (!e.getPlugin().getName().equalsIgnoreCase("vault")) {
     return;
   }
   uninject(e.getPlugin());
 }
コード例 #2
0
ファイル: Economy_BOSE6.java プロジェクト: jasonhyland/Vault
 @EventHandler(priority = EventPriority.MONITOR)
 public void onPluginDisable(PluginDisableEvent event) {
   if (economy.economy != null) {
     if (event.getPlugin().getDescription().getName().equals("BOSEconomy")
         && event.getPlugin().getDescription().getVersion().startsWith("0.6")) {
       economy.economy = null;
       log.info(
           String.format(
               "[%s][Economy] %s unhooked.", plugin.getDescription().getName(), economy.name));
     }
   }
 }
コード例 #3
0
  @EventHandler(priority = EventPriority.NORMAL)
  public void onPluginDisable(PluginDisableEvent event) {
    ProtectionPlugins protectionPlugin;
    try {
      protectionPlugin = ProtectionPlugins.valueOf(event.getPlugin().getName());
    } catch (Exception e) {
      return;
    }

    this.instance.getLogger().info("Unloading protection plugin: " + event.getPlugin().getName());
    protectionPlugin.removeHandler();
  }
コード例 #4
0
    @EventHandler
    public void onPluginDisable(PluginDisableEvent event) {
      String name = event.getPlugin().getDescription().getName();

      if (event.getPlugin() instanceof PermissionsProvider
          || "permissions".equalsIgnoreCase(name)
          || "permissionsex".equalsIgnoreCase(name)
          || "bpermissions".equalsIgnoreCase(name)
          || "groupmanager".equalsIgnoreCase(name)) {
        load();
      }
    }
コード例 #5
0
 @EventHandler(priority = EventPriority.MONITOR)
 public void onPluginDisable(final PluginDisableEvent event) {
   if (event.getPlugin().getName().equals("EssentialsChat")) {
     ess.getSettings().setEssentialsChatActive(false);
   }
   ess.getAlternativeCommandsHandler().removePlugin(event.getPlugin());
   // Check to see if the plugin thats being disabled is the one we are using
   if (ess.getPaymentMethod() != null
       && Methods.hasMethod()
       && Methods.checkDisabled(event.getPlugin())) {
     Methods.reset();
     ess.getLogger().log(Level.INFO, "Payment method was disabled. No longer accepting payments.");
   }
 }
コード例 #6
0
ファイル: NPCManager.java プロジェクト: samkio/GlobalBank
 @EventHandler
 public void onPluginDisable(PluginDisableEvent event) {
   if (event.getPlugin() == plugin) {
     despawnAll();
     Bukkit.getServer().getScheduler().cancelTask(taskid);
   }
 }
コード例 #7
0
 @Override
 public void onPluginDisable(PluginDisableEvent event) {
   if (event.getPlugin().getDescription().getName().equals("iConomy")) {
     BetterShop.iConomy = null;
     iBank = null;
     Log(Level.WARNING, "iConomy has been disabled!");
   } else if (event.getPlugin().getDescription().getName().equals("BOSEconomy")) {
     BetterShop.economy = null;
     Log(Level.WARNING, "BOSEconomy has been disabled");
   } else if (event.getPlugin().getDescription().getName().equals("Permissions")) {
     BetterShop.Permissions = null;
     Log("Permissions support disabled");
   } else if (event.getPlugin().getDescription().getName().equals("MinecraftIM")) {
     messenger = null;
     Log("MinecraftIM link disabled");
   }
 }
コード例 #8
0
ファイル: ic4_Engine.java プロジェクト: Holyvirus/Blacksmith
 @EventHandler()
 public void onPluginDisable(PluginDisableEvent event) {
   if (eco.eco != null) {
     if (event.getPlugin().getDescription().getName().equals("iConomy")) {
       eco.eco = null;
       plugin.getLogger().log(Level.INFO, "Succesfully unhooked into iConomy 4!");
     }
   }
 }
コード例 #9
0
ファイル: server.java プロジェクト: Xemos/xPlugins
 @EventHandler(priority = EventPriority.MONITOR)
 public void onPluginDisable(final PluginDisableEvent event) {
   if (plugin.iConomy != null) {
     if (event.getPlugin().getDescription().getName().equals("iConomy")) {
       plugin.iConomy = null;
       System.out.println("[MyPlugin] un-hooked from iConomy.");
     }
   }
 }
コード例 #10
0
ファイル: Chat_mChat.java プロジェクト: TheEliteFour/Vault
 public void onPluginDisable(PluginDisableEvent event) {
   if (this.chat.mChat != null) {
     if (event.getPlugin().getDescription().getName().equals("mChat")) {
       this.chat.mChat = null;
       log.info(
           String.format(
               "[%s][Chat] %s un-hooked.", plugin.getDescription().getName(), "mChat"));
     }
   }
 }
コード例 #11
0
ファイル: ServerListen.java プロジェクト: tustin2121/Citizens
 @Override
 public void onPluginDisable(PluginDisableEvent event) {
   if (this.methods != null && this.methods.hasMethod()) {
     Boolean check = this.methods.checkDisabled(event.getPlugin());
     if (check) {
       Messaging.log("Payment method disabled.");
     }
     EconomyManager.setServerEconomyEnabled(false);
   }
 }
コード例 #12
0
 @EventHandler(priority = EventPriority.MONITOR)
 public void onPluginDisable(PluginDisableEvent event) {
   if (perms != null) {
     if (event.getPlugin().getDescription().getName().equals("Starburst")) {
       perms = null;
       log.info(
           String.format(
               "[%s][Permission] %s un-hooked.", plugin.getDescription().getName(), name));
     }
   }
 }
コード例 #13
0
 @EventHandler(priority = EventPriority.MONITOR)
 public void onPluginDisable(PluginDisableEvent event) {
   if (mChat != null) {
     if (event.getPlugin().getDescription().getName().equals("mChatSuite")) {
       mChat = null;
       log.info(
           String.format(
               "[%s][Chat] %s un-hooked.", plugin.getDescription().getName(), "mChatSuite"));
     }
   }
 }
コード例 #14
0
ファイル: ESL.java プロジェクト: captainawesome7/3coBanks
 // All of the below can be copy + pasted at will! No need to explain this, but:
 @Override
 public void onPluginDisable(PluginDisableEvent event) {
   // When the plugin is enabled and 3co isn't null, and the plugin that is disabled is 3co, say
   // that we are releasing it
   if (plugin.eco != null) {
     if (event.getPlugin().getDescription().getName().equals("3co")) {
       plugin.eco = null;
       System.out.println("[3coShop] 3co released!");
     }
   }
 }
コード例 #15
0
  @Override
  public void disable() {
    Bukkit.getPluginManager().registerEvents(this, PluginBungeePermsBukkitBridge.getInstance());
    Plugin plugin = Bukkit.getPluginManager().getPlugin("Vault");
    if (plugin != null) {
      uninject(plugin);
    }

    PluginEnableEvent.getHandlerList().unregister(this);
    PluginDisableEvent.getHandlerList().unregister(this);
  }
コード例 #16
0
 @EventHandler(priority = EventPriority.MONITOR)
 public void onPluginDisable(PluginDisableEvent event) {
   if ((this.permission.perms != null)
       && (event.getPlugin().getDescription().getName().equals("SimplyPerms"))) {
     this.permission.perms = null;
     Permission_SimplyPerms.log.info(
         String.format(
             "[%s][Permission] %s un-hooked.",
             new Object[] {
               Permission_SimplyPerms.this.plugin.getDescription().getName(), "SimplyPerms"
             }));
   }
 }
コード例 #17
0
  @SuppressWarnings("static-access")
  @EventHandler(priority = EventPriority.MONITOR)
  public void onPluginDisable(PluginDisableEvent event) {
    // Check to see if the plugin thats being disabled is the one we are
    // using
    if (this.methods != null && this.methods.hasMethod()) {
      Boolean check = this.methods.checkDisabled(event.getPlugin());

      if (check) {
        EconomySupport.eco = null;
        Language.log_info("iconomyoff");
      }
    }
  }
コード例 #18
0
  /**
   * Check for disabled plugin to remove the associated replacer
   *
   * @param disableEvent the disable event
   */
  @EventHandler
  public void onPluginDisable(PluginDisableEvent disableEvent) {
    // Remove the listener if the associated plugin was disabled
    final String disablePluginName = disableEvent.getPlugin().getName();

    final Map<String, VariableReplaceAdapter<? extends Plugin>> specificReplacers =
        replaceManager.getReplacers();
    final Iterator<VariableReplaceAdapter<? extends Plugin>> iterator =
        specificReplacers.values().iterator();
    while (iterator.hasNext()) {
      final Plugin plugin = iterator.next().getPlugin();
      if (plugin != null && plugin.getName().equals(disablePluginName)) {
        iterator.remove();
      }
    }
  }
コード例 #19
0
 @EventHandler
 public void onPluginDisabled(PluginDisableEvent e) {
   onPluginDisabled(e.getPlugin());
 }