Disable MCStats messages + Respect opt-out

This commit is contained in:
addstar 2013-11-01 13:39:51 +11:00
parent ca7a5d4e17
commit 534bf0a4c3

View File

@ -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 ;(!");