mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2025-01-23 00:31:25 +01:00
update bStats Metrics class
This commit is contained in:
parent
dc356e88d0
commit
d61d186544
12
pom.xml
12
pom.xml
@ -34,10 +34,6 @@
|
||||
<id>minebench-repo</id>
|
||||
<url>https://repo.minebench.de/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>CodeMC</id>
|
||||
<url>https://repo.codemc.org/repository/maven-public</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<pluginRepositories>
|
||||
@ -325,13 +321,7 @@
|
||||
<dependency>
|
||||
<groupId>org.bstats</groupId>
|
||||
<artifactId>bstats-bukkit</artifactId>
|
||||
<version>1.8</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
<version>2.2.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.dumptruckman.minecraft</groupId>
|
||||
|
@ -1,11 +1,12 @@
|
||||
package com.onarandombox.MultiverseCore.utils.metrics;
|
||||
|
||||
import org.bstats.charts.AdvancedPie;
|
||||
import org.bstats.charts.MultiLineChart;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import org.bstats.bukkit.Metrics;
|
||||
|
||||
enum MetricsHelper {
|
||||
;
|
||||
|
||||
@ -17,16 +18,16 @@ enum MetricsHelper {
|
||||
map.put(key, count + 1);
|
||||
}
|
||||
|
||||
static Metrics.AdvancedPie createAdvancedPieChart(String chartId, Consumer<Map<String, Integer>> metricsFunc) {
|
||||
static AdvancedPie createAdvancedPieChart(String chartId, Consumer<Map<String, Integer>> metricsFunc) {
|
||||
Map<String, Integer> map = new HashMap<>();
|
||||
metricsFunc.accept(map);
|
||||
return new Metrics.AdvancedPie(chartId, () -> map);
|
||||
return new AdvancedPie(chartId, () -> map);
|
||||
}
|
||||
|
||||
static Metrics.MultiLineChart createMultiLineChart(String chartId, Consumer<Map<String, Integer>> metricsFunc) {
|
||||
static MultiLineChart createMultiLineChart(String chartId, Consumer<Map<String, Integer>> metricsFunc) {
|
||||
Map<String, Integer> map = new HashMap<>();
|
||||
metricsFunc.accept(map);
|
||||
return new Metrics.MultiLineChart(chartId, () -> map);
|
||||
return new MultiLineChart(chartId, () -> map);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user