Fix plugin startup

This commit is contained in:
vemacs 2015-07-05 09:37:17 -06:00
parent d03d85b52b
commit b9f293f8a7

View File

@ -205,17 +205,17 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials {
Economy.setEss(this); Economy.setEss(this);
execTimer.mark("RegHandler"); execTimer.mark("RegHandler");
try {
metrics = new MetricsLite(this);
} catch (IOException e) {
// Failed to submit the stats :-(
}
if (!metrics.isOptOut()) { if (!metrics.isOptOut()) {
getLogger().info("Starting Metrics. Opt-out using the global PluginMetrics config."); getLogger().info("Starting Metrics. Opt-out using the global PluginMetrics config.");
new BukkitRunnable() { new BukkitRunnable() {
@Override @Override
public void run() { public void run() {
try {
metrics = new MetricsLite(Essentials.this);
metrics.start(); metrics.start();
} catch (IOException e) {
// Failed to submit the stats :-(
}
} }
}.runTaskAsynchronously(this); }.runTaskAsynchronously(this);
} else { } else {