if (War.war.getWarzones().size() > 0) {
War.war.log("Warzones ready.", Level.INFO);
final int zones = War.war.getWarzones().size();
try {
Metrics metrics = new Metrics(War.war);
Graph warzoneCount = metrics.createGraph("Warzones");
warzoneCount.addPlotter(new FixedPlotter("Count", zones));
Graph language = metrics.createGraph("Language");
String langName = War.war.getLoadedLocale().getDisplayLanguage(Locale.ENGLISH);
if (langName.isEmpty()) {
langName = "English";
}
language.addPlotter(new PlotterEnabled(langName));
Graph plugins = metrics.createGraph("Extensions");
if (War.war.isSpoutServer()) {
plugins.addPlotter(new PlotterEnabled("Spout"));
}
if (War.war.isTagServer()) {
plugins.addPlotter(new PlotterEnabled("TagAPI"));
}
if (Bukkit.getPluginManager().isPluginEnabled("WorldEdit")) {
plugins.addPlotter(new PlotterEnabled("WorldEdit"));
}
plugins.addPlotter(new PlotterEnabled("War")); // of course
metrics.start();
} catch (IOException ignored) {
}
}
}