Last active
October 1, 2021 20:47
-
-
Save Bastian/6ed19dae0322881af4f3dab87075397f to your computer and use it in GitHub Desktop.
Simple Pie 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 SimplePie("used_language", () -> { | |
return getConfig.getString("language", "en"); | |
})); | |
} | |
// If you use the Copy & Paste Metrics classes, use `Metrics.SimplePie` instead |
getConfig
should probably be changed to getConfig()
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This example should be simplified as (at least) Java 8 supports simpler Lambda expressions.
E.g.