Package org.mcstats.Metrics

Examples of org.mcstats.Metrics.Graph


      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) {
        }
      }
    }
View Full Code Here


    Set<String> mapNames = Sets.newHashSet();
    for (AutoRefMap map : AutoRefMap.getRemoteMaps())
      mapNames.add(map.getName());

    Graph gMaps = metrics.createGraph("Most Popular Maps");
    playedMapsTracker = new PieChartGraph(gMaps, mapNames);

    metrics.start();
  }
View Full Code Here

TOP

Related Classes of org.mcstats.Metrics.Graph

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.