add more debug to load/enable error

This commit is contained in:
jascotty2 2019-10-11 07:43:32 -05:00
parent d27e3aafbd
commit 27fbe34c03

View File

@ -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() {