Capture errors in plugins onLoad
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
57fa7c0118
commit
f3fe2a426c
1 changed files with 2 additions and 2 deletions
|
@ -64,8 +64,8 @@ public final class CraftServer implements Server {
|
||||||
for (Plugin plugin : plugins) {
|
for (Plugin plugin : plugins) {
|
||||||
try {
|
try {
|
||||||
plugin.onLoad();
|
plugin.onLoad();
|
||||||
} catch (AbstractMethodError ame) {
|
} catch (Throwable ex) {
|
||||||
Logger.getLogger("Minecraft").warning("Plugin: " + plugin.getDescription().getName() + " does not support the onLoad() method");
|
Logger.getLogger(CraftServer.class.getName()).log(Level.SEVERE, ex.getMessage() + " initializing " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (Plugin plugin : plugins) {
|
for (Plugin plugin : plugins) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue