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);
execTimer.mark("RegHandler");
try {
metrics = new MetricsLite(this);
} catch (IOException e) {
// Failed to submit the stats :-(
}
if (!metrics.isOptOut()) {
getLogger().info("Starting Metrics. Opt-out using the global PluginMetrics config.");
new BukkitRunnable() {
@Override
public void run() {
try {
metrics = new MetricsLite(Essentials.this);
metrics.start();
} catch (IOException e) {
// Failed to submit the stats :-(
}
}
}.runTaskAsynchronously(this);
} else {