From 27fbe34c03ec40a393075351eec87d9f099f5f9d Mon Sep 17 00:00:00 2001 From: jascotty2 Date: Fri, 11 Oct 2019 07:43:32 -0500 Subject: [PATCH] add more debug to load/enable error --- .../java/com/songoda/core/SongodaPlugin.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Core/src/main/java/com/songoda/core/SongodaPlugin.java b/Core/src/main/java/com/songoda/core/SongodaPlugin.java index 15e38515..959c2ceb 100644 --- a/Core/src/main/java/com/songoda/core/SongodaPlugin.java +++ b/Core/src/main/java/com/songoda/core/SongodaPlugin.java @@ -68,7 +68,11 @@ public abstract class SongodaPlugin extends JavaPlugin { try { onPluginLoad(); } catch (Throwable t) { - getLogger().log(Level.SEVERE, "Unexpected error while loading " + getDescription().getName() + ": Disabling plugin!", t); + Bukkit.getLogger().log(Level.SEVERE, + "Unexpected error while loading " + getDescription().getName() + + " v" + getDescription().getVersion() + + " c" + SongodaCore.getCoreLibraryVersion() + + ": Disabling plugin!", t); emergencyStop = true; } } @@ -80,7 +84,7 @@ public abstract class SongodaPlugin extends JavaPlugin { return; } - console.sendMessage(""); // blank line to speparate chatter + console.sendMessage(""); // blank line to separate chatter console.sendMessage(ChatColor.GREEN + "============================="); console.sendMessage(String.format("%s%s %s by %sSongoda <3!", ChatColor.GRAY.toString(), getDescription().getName(), getDescription().getVersion(), ChatColor.DARK_PURPLE.toString())); @@ -99,7 +103,11 @@ public abstract class SongodaPlugin extends JavaPlugin { // Start Metrics Metrics.start(this); } catch (Throwable t) { - getLogger().log(Level.SEVERE, "Unexpected error while loading " + getDescription().getName() + ": Disabling plugin!", t); + Bukkit.getLogger().log(Level.SEVERE, + "Unexpected error while loading " + getDescription().getName() + + " v" + getDescription().getVersion() + + " c" + SongodaCore.getCoreLibraryVersion() + + ": Disabling plugin!", t); emergencyStop(); console.sendMessage(ChatColor.RED + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); console.sendMessage(""); @@ -107,7 +115,7 @@ public abstract class SongodaPlugin extends JavaPlugin { } console.sendMessage(ChatColor.GREEN + "============================="); - console.sendMessage(""); // blank line to speparate chatter + console.sendMessage(""); // blank line to separate chatter } protected void emergencyStop() {