SHARE
TWEET

Untitled

a guest Jun 18th, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     public void disablePlugin(Plugin plugin) {
  2.         if (plugin.isEnabled()) {
  3.             try {
  4.                 plugin.getPluginLoader().disablePlugin(plugin);
  5.             } catch (Throwable var7) {
  6.                 this.server.getLogger().log(Level.SEVERE, "Error occurred (in the plugin loader) while disabling " + plugin.getDescription().getFullName() + " (Is it up to date?)", var7);
  7.             }
  8.  
  9.             try {
  10.                 this.server.getScheduler().cancelTasks(plugin);
  11.             } catch (Throwable var6) {
  12.                 this.server.getLogger().log(Level.SEVERE, "Error occurred (in the plugin loader) while cancelling tasks for " + plugin.getDescription().getFullName() + " (Is it up to date?)", var6);
  13.             }
  14.  
  15.             try {
  16.                 this.server.getServicesManager().unregisterAll(plugin);
  17.             } catch (Throwable var5) {
  18.                 this.server.getLogger().log(Level.SEVERE, "Error occurred (in the plugin loader) while unregistering services for " + plugin.getDescription().getFullName() + " (Is it up to date?)", var5);
  19.             }
  20.  
  21.             try {
  22.                 HandlerList.unregisterAll(plugin);
  23.             } catch (Throwable var4) {
  24.                 this.server.getLogger().log(Level.SEVERE, "Error occurred (in the plugin loader) while unregistering events for " + plugin.getDescription().getFullName() + " (Is it up to date?)", var4);
  25.             }
  26.  
  27.             try {
  28.                 this.server.getMessenger().unregisterIncomingPluginChannel(plugin);
  29.                 this.server.getMessenger().unregisterOutgoingPluginChannel(plugin);
  30.             } catch (Throwable var3) {
  31.                 this.server.getLogger().log(Level.SEVERE, "Error occurred (in the plugin loader) while unregistering plugin channels for " + plugin.getDescription().getFullName() + " (Is it up to date?)", var3);
  32.             }
  33.         }
  34.  
  35.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top