From 04779d28fb6e9d12fde1452c07f21ec829bbd130 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Sat, 13 Apr 2019 12:26:19 +1000 Subject: [PATCH] Don't fail on metrics error --- .../plotsquared/bukkit/BukkitMain.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java index 0ef174a04..340197c5a 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java +++ b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java @@ -657,11 +657,15 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain if (this.metricsStarted) { return; } - System.setProperty("bstats.relocatecheck", - "false"); // We do not want to relocate the package... - Metrics metrics = new Metrics(this);// bstats - PlotSquared.log(Captions.PREFIX + "&6Metrics enabled."); this.metricsStarted = true; + try { + System.setProperty("bstats.relocatecheck", + "false"); // We do not want to relocate the package... + Metrics metrics = new Metrics(this);// bstats + PlotSquared.log(Captions.PREFIX + "&6Metrics enabled."); + } catch (Throwable e) { + e.printStackTrace(); + } } @Override public ChunkManager initChunkManager() {