Debug how long it took for the entire plugin to enable all the way.

This commit is contained in:
graywolf336 2014-07-24 23:01:10 -05:00
parent 0362dac92d
commit 7b3a085edb

View File

@ -47,6 +47,7 @@ public class JailMain extends JavaPlugin {
private int updateCheckTask = -1; private int updateCheckTask = -1;
public void onEnable() { public void onEnable() {
long st = System.currentTimeMillis();
loadConfig(); loadConfig();
debug = getConfig().getBoolean(Settings.DEBUG.getPath()); debug = getConfig().getBoolean(Settings.DEBUG.getPath());
@ -114,6 +115,7 @@ public class JailMain extends JavaPlugin {
reloadUpdateCheck(); reloadUpdateCheck();
new JailsAPI(this); new JailsAPI(this);
debug("Took " + (System.currentTimeMillis() - st) + " to enable the plugin.");
getLogger().info("Completed enablement."); getLogger().info("Completed enablement.");
} }
@ -223,6 +225,7 @@ public class JailMain extends JavaPlugin {
} }
} }
/** Reloads the update checker, in case they changed a setting about it. */
public void reloadUpdateCheck() { public void reloadUpdateCheck() {
getServer().getScheduler().cancelTask(updateCheckTask); getServer().getScheduler().cancelTask(updateCheckTask);
update = new Update(this); update = new Update(this);