mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-28 11:44:42 +02:00
Add graph to see if any config values have been changed from the default, or if a server is 100% vanilla configs
This commit is contained in:
@ -22,6 +22,8 @@ public class MetricsManager {
|
||||
private static Tracker chimeraUseTracker;
|
||||
private static Tracker chimeraServerUseTracker;
|
||||
|
||||
private static boolean customConfig = false;
|
||||
|
||||
private static DataTracker tracker;
|
||||
private static EMetrics emetrics;
|
||||
|
||||
@ -220,6 +222,26 @@ public class MetricsManager {
|
||||
});
|
||||
}
|
||||
|
||||
// Vanilla v Modified config graph
|
||||
Graph customConfigGraph = metrics.createGraph("Modified Configs");
|
||||
|
||||
if (customConfig) {
|
||||
customConfigGraph.addPlotter(new Metrics.Plotter("Edited") {
|
||||
@Override
|
||||
public int getValue() {
|
||||
return 1;
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
customConfigGraph.addPlotter(new Metrics.Plotter("Vanilla") {
|
||||
@Override
|
||||
public int getValue() {
|
||||
return 1;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* Debug stuff
|
||||
tracker = emetrics.getDataTracker();
|
||||
tracker.enable();
|
||||
@ -239,6 +261,10 @@ public class MetricsManager {
|
||||
chimeraServerUseTracker.increment();
|
||||
}
|
||||
|
||||
public static void customConfig() {
|
||||
customConfig = true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static void debug() {
|
||||
emetrics.getMetrics().flush();
|
||||
|
Reference in New Issue
Block a user