From 534bf0a4c36cca6627e997e0dc0864e1865d7ec9 Mon Sep 17 00:00:00 2001 From: addstar Date: Fri, 1 Nov 2013 13:39:51 +1100 Subject: [PATCH] Disable MCStats messages + Respect opt-out --- src/nl/Steffion/BlockHunt/BlockHunt.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/nl/Steffion/BlockHunt/BlockHunt.java b/src/nl/Steffion/BlockHunt/BlockHunt.java index b68e2da..aa94cdf 100644 --- a/src/nl/Steffion/BlockHunt/BlockHunt.java +++ b/src/nl/Steffion/BlockHunt/BlockHunt.java @@ -238,6 +238,7 @@ public class BlockHunt extends JavaPlugin implements Listener { public void run() { try { Metrics metrics = new Metrics(plugin); + if (metrics.isOptOut()) { return; } Graph playersPlayingBlockHunt = metrics .createGraph("Players playing BlockHunt"); @@ -275,13 +276,13 @@ public class BlockHunt extends JavaPlugin implements Listener { metrics.start(); FileConfiguration metrics_fc = new YamlConfiguration(); metrics_fc.load(metrics.getConfigFile()); - if (!metrics_fc.getBoolean("opt-out", false)) { + /*if (!metrics_fc.getBoolean("opt-out", false)) { MessageM.sendMessage(null, "%TAG%NSending %AMCStats%N to the server..."); } else { MessageM.sendMessage(null, "%TAG%EUnable to send %AMCStats %Eto the server. %AMCStats%E is disabled?"); - } + }*/ } catch (IOException e) { MessageM.sendMessage(null, "%TAG%EUnable to send %AMCStats %Eto the server. Something went wrong ;(!");