mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-13 11:18:23 +01:00
Changed PluginDisableEvent to fire before the disabling of a plugin, instead of after (where it's then invalid). Thanks to holic for the PR.
By: Nathan Adams <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
0c182ec82d
commit
4e9fcec4a4
1 changed files with 2 additions and 2 deletions
|
@ -991,6 +991,8 @@ public class JavaPluginLoader implements PluginLoader {
|
|||
}
|
||||
|
||||
if (plugin.isEnabled()) {
|
||||
server.getPluginManager().callEvent(new PluginDisableEvent(plugin));
|
||||
|
||||
JavaPlugin jPlugin = (JavaPlugin) plugin;
|
||||
ClassLoader cloader = jPlugin.getClassLoader();
|
||||
|
||||
|
@ -1000,8 +1002,6 @@ public class JavaPluginLoader implements PluginLoader {
|
|||
server.getLogger().log(Level.SEVERE, "Error occurred while disabling " + plugin.getDescription().getFullName() + " (Is it up to date?): " + ex.getMessage(), ex);
|
||||
}
|
||||
|
||||
server.getPluginManager().callEvent(new PluginDisableEvent(plugin));
|
||||
|
||||
loaders.remove(jPlugin.getDescription().getName());
|
||||
|
||||
if (cloader instanceof PluginClassLoader) {
|
||||
|
|
Loading…
Add table
Reference in a new issue