Put whole block into try-catch (just in case)

This commit is contained in:
vemacs 2015-07-05 09:41:11 -06:00
parent b9f293f8a7
commit 14384f6bfa

View File

@ -207,20 +207,20 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials {
try {
metrics = new MetricsLite(this);
if (!metrics.isOptOut()) {
getLogger().info("Starting Metrics. Opt-out using the global PluginMetrics config.");
new BukkitRunnable() {
@Override
public void run() {
metrics.start();
}
}.runTaskAsynchronously(this);
} else {
getLogger().info("Metrics disabled per PluginMetrics config.");
}
} 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() {
metrics.start();
}
}.runTaskAsynchronously(this);
} else {
getLogger().info("Metrics disabled per PluginMetrics config.");
}
final String timeroutput = execTimer.end();
if (getSettings().isDebug()) {