Repository navigation
Leaderboards
Since 2026.3.12.0
Leaderboards rank your players without any extra plugin: a /top menu, hologram boards you place
in the world, and placeholders for scoreboards, tab and any hologram plugin.
Everything lives in leaderboards.yml. Leaderboards are a module, so they switch off like any
other with modules.leaderboards in config.yml.
| Board id | Ranks players by |
|---|---|
currency_<name> |
Balance of that currency - one board per currency in currencies.yml (currency_money, currency_tokens, ...). currency_credits is off by default |
blocks |
Blocks mined |
ranks |
Rank (shown with the rank prefix) |
prestiges |
Prestige |
rebirths |
Rebirths |
autominer |
AutoMiner time left |
gangs |
Gang value (ranks gangs, not players) |
Add-ons can register more boards through the API; they appear in the menu, as holograms and as placeholders automatically.
Under boards: you can rename a board (display-name), change its menu icon (icon) or switch it
off (enabled: false). The order of that list is the order of the menu. A board not listed there
uses its default name and a paper icon.
Boards are recalculated in the background every refresh-seconds (60 by default) and keep the top
snapshot-size positions (100 by default). Nothing runs while players mine. Values come from the
database, so a player's newest progress shows up after the next player-data save and refresh.
/top (also /leaderboards, /lb - change them under commands:) opens a menu with every board,
its top 3 and the player's own position. Clicking a board opens the full ranking with player heads
and a "your position" item.
-
/top <board>opens one board directly, e.g./top currency_tokens. -
/top <board> <player>or/top <player>opens it for another player - handy for NPCs. This needsxprison.menu.other(see Commands & Permissions).
Both menus are fully configurable under gui.menu and gui.board: title, rows, filler, the slots
the boards / positions fill, item names and lore, and the page buttons.
Needs DecentHolograms. Without it the menu and placeholders still work and the console prints one warning.
| Command | Description |
|---|---|
/xprison leaderboard create <id> <board> [lines] |
Place a board above you. id is your own name for it (a-z, 0-9, _, -); lines defaults to 10 |
/xprison leaderboard move <id> |
Move a placed board to you |
/xprison leaderboard delete <id> |
Remove a placed board |
/xprison leaderboard list |
Show every board id and every placed hologram |
/xprison leaderboard refresh |
Recalculate every board now |
Placed boards are saved in plugins/X-Prison/leaderboards/holograms.yml and update on their own
after every refresh. Their look is set under hologram: - header and footer lines plus the
line template for each position (%position%, %name%, %value%; %board% and %refresh% work
in the header and footer).
| Placeholder | Description |
|---|---|
%xprison_lb_<board>_<position>_name% |
Who holds that position, e.g. %xprison_lb_currency_tokens_1_name%
|
%xprison_lb_<board>_<position>_value% |
The formatted value, e.g. 1.5M
|
%xprison_lb_<board>_<position>_value_raw% |
The plain number, e.g. 1500000
|
%xprison_lb_<board>_position% |
The viewing player's own position (#3), or empty-value if they are not ranked |
An empty position shows empty-name / empty-value from leaderboards.yml.
| Permission | Default | Description |
|---|---|---|
xprison.leaderboards |
everyone | Open /top
|
The /xprison leaderboard commands need xprison.admin, like every /xprison subcommand.
XPrisonLeaderboardsAPI leaderboards = XPrisonAPI.getInstance().getLeaderboardsApi();
leaderboards.registerSource(new LeaderboardSource() {
public String getId() { return "pets_level"; }
public String getDisplayName() { return "<gold>Highest Pet Level"; }
public List<LeaderboardEntry> fetch(int limit) { // called off the main thread
return myDatabase.topPetLevels(limit);
}
});
LeaderboardEntry first = leaderboards.getEntry("currency_tokens", 1);
OptionalInt position = leaderboards.getPosition("blocks", player.getUniqueId());Every read is served from the cached snapshot, so it is safe on the main thread. See Developer API.
The default file: leaderboards.yml.
- Home
- Features
- Setup
- Commands & Permissions
- Placeholders
- Logging
- Season Reset
- Translations
- Item Models & Tooltips
- Changelog
- Currencies
- Ranks
- Prestiges
- Rebirths
- Mines
- AutoSell
- AutoMiner
- Enchants
- Pickaxe Levels
- Pickaxe Skins
- Pickaxe Quality
- Pickaxe Settings
- Gangs
- Multipliers
- Blocks
- Bombs
- History
- Mining Stats
- Nicknames
- Battle Pass
- Quests
- Daily Rewards
- Milestones
- Leaderboards
- Boosters
- config.yml
- autominer.yml
- autosell.yml
- block-rewards.yml
- enchants.yml
- currencies.yml
- multipliers.yml
- ranks.yml
- prestiges.yml
- pickaxe-levels.yml
- pickaxe-skins.yml
- pickaxe-quality.yml
- gangs.yml
- mines.yml
- bombs.yml
- blocks.yml
- history.yml
- logging.yml
- mining-stats.yml
- rebirths.yml
- battlepass.yml
- quests.yml
- dailyrewards.yml
- milestones.yml
- leaderboards.yml
- boosters.yml
- efficiency.json
- fortune.json
- unbreaking.json
- haste.json
- speed.json
- fly.json
- nightvision.json
- jumpboost.json
- autosell.json
- tokenfinder.json
- gemfinder.json
- salary.json
- charity.json
- blessing.json
- gangvaluefinder.json
- prestigefinder.json
- explosive.json
- nuke.json
- layer.json
- laserbeam.json
- second-hand.json
- sixth-hand.json
- doomfall.json
- prism-break.json
- gem-merchant.json
- token-merchant.json
- super-token-miner.json
- double-strike.json
- prodigy.json
- blockbooster.json
