Last active
May 13, 2021 17:44
-
-
Save Bastian/4445ea82bc921dfef82de90b535deb3e to your computer and use it in GitHub Desktop.
Multi Line Chart example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onEnable() { | |
Metrics metrics = new Metrics(this); | |
metrics.addCustomChart(new MultiLineChart("players_and_servers", new Callable<Map<String, Integer>>() { | |
@Override | |
public Map<String, Integer> call() throws Exception { | |
Map<String, Integer> valueMap = new HashMap<>(); | |
valueMap.put("servers", 1); | |
valueMap.put("players", Bukkit.getOnlinePlayers().size()); | |
return valueMap; | |
} | |
})); | |
} | |
// If you use the Copy & Paste Metrics classes, use `Metrics.MultiLineChart` instead |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment