From 1d316f9420ac7f928748617087d81b4509e33021 Mon Sep 17 00:00:00 2001 From: Glitchfinder Date: Wed, 20 Feb 2013 15:30:42 -0800 Subject: [PATCH] Making the error reporting for enabling mcMMO more informative. --- src/main/java/com/gmail/nossr50/mcMMO.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/mcMMO.java b/src/main/java/com/gmail/nossr50/mcMMO.java index e72a6a6d5..47236aa1e 100644 --- a/src/main/java/com/gmail/nossr50/mcMMO.java +++ b/src/main/java/com/gmail/nossr50/mcMMO.java @@ -143,7 +143,15 @@ public class mcMMO extends JavaPlugin { } } catch (Throwable t) { - getLogger().severe("There was an error while enabling mcMMO! Disabling now"); + getLogger().severe("There was an error while enabling mcMMO!"); + + if (!(t instanceof ExceptionInInitializerError)) { + t.printStackTrace(); + } + else { + getLogger().info("Please do not replace the mcMMO jar while the server is running."); + } + Bukkit.getPluginManager().disablePlugin(this); } } @@ -238,7 +246,8 @@ public class mcMMO extends JavaPlugin { } catch (Throwable e) { if (e instanceof NoClassDefFoundError) { - getLogger().severe("Backup class not found. Do not replace the mcMMO jar during runtime."); + getLogger().severe("Backup class not found!"); + getLogger().info("Please do not replace the mcMMO jar while the server is running."); } else { getLogger().severe(e.toString());