From eb422e4ad4d400b39fd93f2c91b6ada41ac13ee1 Mon Sep 17 00:00:00 2001 From: Dinnerbone Date: Thu, 31 Mar 2011 22:33:06 +0100 Subject: [PATCH] Capture errors in plugins onLoad --- src/main/java/org/bukkit/craftbukkit/CraftServer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 03e5b4b62b..2b7f5e9ee2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -64,8 +64,8 @@ public final class CraftServer implements Server { for (Plugin plugin : plugins) { try { plugin.onLoad(); - } catch (AbstractMethodError ame) { - Logger.getLogger("Minecraft").warning("Plugin: " + plugin.getDescription().getName() + " does not support the onLoad() method"); + } catch (Throwable ex) { + Logger.getLogger(CraftServer.class.getName()).log(Level.SEVERE, ex.getMessage() + " initializing " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex); } } for (Plugin plugin : plugins) {