cn.nukkit.event.plugin.PluginDisableEvent Java Examples
The following examples show how to use
cn.nukkit.event.plugin.PluginDisableEvent.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JavaPluginLoader.java From Jupiter with GNU General Public License v3.0 | 5 votes |
@Override public void disablePlugin(Plugin plugin) { if (plugin instanceof PluginBase && plugin.isEnabled()) { this.server.getLogger().info(this.server.getLanguage().translateString("nukkit.plugin.disable", plugin.getDescription().getFullName())); this.server.getServiceManager().cancel(plugin); this.server.getPluginManager().callEvent(new PluginDisableEvent(plugin)); ((PluginBase) plugin).setEnabled(false); } }
Example #2
Source File: JavaPluginLoader.java From Nukkit with GNU General Public License v3.0 | 5 votes |
@Override public void disablePlugin(Plugin plugin) { if (plugin instanceof PluginBase && plugin.isEnabled()) { this.server.getLogger().info(this.server.getLanguage().translateString("nukkit.plugin.disable", plugin.getDescription().getFullName())); this.server.getServiceManager().cancel(plugin); this.server.getPluginManager().callEvent(new PluginDisableEvent(plugin)); ((PluginBase) plugin).setEnabled(false); } }
Example #3
Source File: JavaPluginLoader.java From Nukkit with GNU General Public License v3.0 | 5 votes |
@Override public void disablePlugin(Plugin plugin) { if (plugin instanceof PluginBase && plugin.isEnabled()) { this.server.getLogger().info(this.server.getLanguage().translateString("nukkit.plugin.disable", plugin.getDescription().getFullName())); this.server.getServiceManager().cancel(plugin); this.server.getPluginManager().callEvent(new PluginDisableEvent(plugin)); ((PluginBase) plugin).setEnabled(false); } }
Example #4
Source File: NukkitEventBus.java From LuckPerms with MIT License | 4 votes |
@EventHandler public void onPluginDisable(PluginDisableEvent e) { Plugin plugin = e.getPlugin(); unregisterHandlers(plugin); }