Last active
May 13, 2021 17:44
-
-
Save Bastian/ea8804db0479c539153f53f1561cc7d3 to your computer and use it in GitHub Desktop.
Single 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 SingleLineChart("players", new Callable<Integer>() { | |
@Override | |
public Integer call() throws Exception { | |
// (This is useless as there is already a player chart by default.) | |
return Bukkit.getOnlinePlayers().size(); | |
} | |
})); | |
} | |
// If you use the Copy & Paste Metrics classes, use `Metrics.SingleLineChart` instead |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment