There are two ways to implement the library.
McRankings mcRankings = new McRankings(YOUR_PLUGIN_INSTANCE);
or
McRankings mcRankings = new McRankings(YOUR_PLUGIN_INSTANCE).withPluginName("BedwarsPro");
or disable logging non-important messages as well:
McRankings mcRankings = new McRankings(this)
.withPluginName("BedwarsPro")
.withoutLogging();
By default McRankings uses the plugin name from the plugin.yml (recommended). The plugin name should not include whitespaces.
McRankings mcRankings = new McRankings(YOUR_PLUGIN_INSTANCE);
McRankings.Leaderboard leaderboard = mcRankings.getLeaderboard(0, "Bedwars Wins", "Wins", true);
The code above shows you how to create a new leaderboard. It requires the following paramters:
Integer > Leaderboard ID - This should be an identifier, unique for each leaderboardString > Leaderboard Title - The title of the leaderboard
Bedwars Wins or Total Diamonds FoundString > Metric - The metric shows up behind the score, for example 100 Wins where Wins is the metricBoolean > HigherIsBetter - Set this to true if a higher score is better than a lower score