Skip to main content

Choose What to Rank

A leaderboard ranks one PlaceholderAPI placeholder. Anything that gives a number for each player can be a leaderboard: money, kills, play time, levels, votes, or a stat from another plugin.

1. Find the placeholder​

Placeholders come from PlaceholderAPI expansions. Some that make good leaderboards:

LeaderboardPlaceholderExpansionNumber format
Richest playersvault_eco_balanceVaultCompact
Most player killsstatistic_player_killsStatisticNumber
Most mobs killedstatistic_mob_killsStatisticNumber
Fewest deathsstatistic_deathsStatisticNumber, lowest first
Most play timestatistic_play_one_minuteStatisticTime, in ticks
Highest levelplayer_levelPlayerNumber

Your other plugins often have their own: votes, jobs levels, island levels, McMMO power level and so on. Their pages list the placeholders.

Install an expansion with /papi ecloud download <name> and then /papi reload.

2. Test it​

/papi parse me %statistic_player_kills%

It must print a number. The plugin takes the first number it finds and ignores colour codes, commas and spaces, so &a1,500 counts as 1500 and Level 5 as 5. Watch out for values that are already written as text:

  • 2d 3h 15m counts as 2, so rank the raw value instead (here, the ticks or seconds) and let the Time number format write it.
  • 1.5M counts as 1.5, so look for the expansion's unformatted placeholder.

3. Track it​

/lb admin → Leaderboards → Track a Placeholder, then type it in chat. With or without the % signs both work. Command: /lb admin track statistic_player_kills.

The placeholder must give a number for at least one player online. When nobody is online it is tracked anyway and checked at the first refresh.

4. Set its format and order​

On the leaderboard's screen:

  • Number Format → Time for anything counted in time, then Time Unit to what the placeholder counts in: Minecraft statistics count ticks (20 per second).
  • Ranking Order → lowest first for deaths, lap times, or anything where less is better.

The examples on the Number Format screen use the leaderboard's real #1 value, so you see at once whether the unit is right: a play time of 52y 3d means the unit is too big.

Check it worked​

/lb top statistic_player_kills 5

shows the top 5 in the format you chose. Players who were offline while it was tracked appear the next time they are online during a refresh.

Common mistakes​

ProblemFix
does not give a number for anyone onlineThe expansion is not installed, or the placeholder is misspelled. /papi parse me shows what it gives
The values are tiny (2, 1.5)The placeholder is already formatted text. Use the raw one
Times are far too big or smallSet the Time Unit to what the placeholder counts in
The worst player is #1Set Ranking Order to the other way