Updated used version of MC stats.

This commit is contained in:
Jeremy Wood 2016-02-29 20:04:26 -05:00
parent d2d243caec
commit cd312c3ab9
2 changed files with 13 additions and 7 deletions

View File

@ -29,6 +29,11 @@
<id>vault-repo</id>
<url>http://nexus.theyeticave.net/content/repositories/pub_releases</url>
</repository>
<!-- Has a copy of metrics R8-SNAPSHOT !-->
<repository>
<id>elmakers-repo</id>
<url>http://maven.elmakers.com/repository/</url>
</repository>
</repositories>
<pluginRepositories>
@ -252,7 +257,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.8.8-R0.1-SNAPSHOT</version>
<version>1.9-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<!--Spigot API-->
@ -303,7 +308,7 @@
<dependency>
<groupId>org.mcstats.bukkit</groupId>
<artifactId>metrics</artifactId>
<version>R6</version>
<version>R8-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
<exclusions>

View File

@ -414,17 +414,18 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core {
try {
Metrics m = new Metrics(this);
Metrics.Graph envGraph = m.createGraph("worlds_by_env");
Metrics.Graph envGraph = m.createGraph("Worlds by environment");
for (Environment env : Environment.values())
envGraph.addPlotter(new EnvironmentPlotter(this, env));
m.addCustomData(new Metrics.Plotter("Loaded worlds") {
Metrics.Graph loadedWorldsGraph = m.createGraph("Worlds by environment");
loadedWorldsGraph.addPlotter(new Metrics.Plotter("Loaded worlds") {
@Override
public int getValue() {
return getMVWorldManager().getMVWorlds().size();
}
});
m.addCustomData(new Metrics.Plotter("Total number of worlds") {
loadedWorldsGraph.addPlotter(new Metrics.Plotter("Total number of worlds") {
@Override
public int getValue() {
return getMVWorldManager().getMVWorlds().size()
@ -437,13 +438,13 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core {
gens.add(w.getGenerator());
gens.remove(null);
gens.remove("null");
Metrics.Graph genGraph = m.createGraph("custom_gens");
Metrics.Graph genGraph = m.createGraph("Custom Generators");
for (String gen : gens)
genGraph.addPlotter(new GeneratorPlotter(this, gen));
m.start();
log(Level.FINE, "Metrics have run!");
} catch (IOException e) {
} catch (Exception e) {
log(Level.WARNING, "There was an issue while enabling metrics: " + e.getMessage());
}
}