13
0
geforkt von Mirrors/Paper

Added check and catch for errors during cancelTasks and unregister of services during plugin disable

By: stevenh <steven.hartland@multiplay.co.uk>
Dieser Commit ist enthalten in:
Bukkit/Spigot 2011-05-22 22:18:05 +01:00
Ursprung 8eddaae2f2
Commit 9469bb110d

Datei anzeigen

@ -271,9 +271,17 @@ public final class SimplePluginManager implements PluginManager {
server.getLogger().log(Level.SEVERE, "Error occurred (in the plugin loader) while disabling " + plugin.getDescription().getFullName() + " (Is it up to date?): " + ex.getMessage(), ex);
}
// Forced disable
server.getScheduler().cancelTasks(plugin);
server.getServicesManager().unregisterAll(plugin);
try {
server.getScheduler().cancelTasks(plugin);
} catch (Throwable ex) {
server.getLogger().log(Level.SEVERE, "Error occurred (in the plugin loader) while cancelling tasks for " + plugin.getDescription().getFullName() + " (Is it up to date?): " + ex.getMessage(), ex);
}
try {
server.getServicesManager().unregisterAll(plugin);
} catch (Throwable ex) {
server.getLogger().log(Level.SEVERE, "Error occurred (in the plugin loader) while unregistering services for " + plugin.getDescription().getFullName() + " (Is it up to date?): " + ex.getMessage(), ex);
}
}
}