mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-05 20:12:54 +00:00
Put whole block into try-catch (just in case)
This commit is contained in:
parent
b9f293f8a7
commit
14384f6bfa
1 changed files with 11 additions and 11 deletions
|
@ -207,20 +207,20 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
metrics = new MetricsLite(this);
|
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) {
|
} catch (IOException e) {
|
||||||
// Failed to submit the stats :-(
|
// 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();
|
final String timeroutput = execTimer.end();
|
||||||
if (getSettings().isDebug()) {
|
if (getSettings().isDebug()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue