mirror of
https://github.com/songoda/SongodaCore.git
synced 2024-11-23 18:45:34 +01:00
add more debug to load/enable error
This commit is contained in:
parent
d27e3aafbd
commit
27fbe34c03
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user