Leaderboards
The /top leaderboards, their types and entry requirements, adding your own type, and how the cache works.
/top shows who is best at rating, kills, K/D, streaks, wins and win rate. Each leaderboard has
requirements, so a player with one lucky kill does not top the K/D board. Settings:
leaderboardSettings in configs/statistic/AdvancedStatistic.yml. Leaderboards need the
AdvancedStatistic module.
/top the rating leaderboard, page 1
/top kills 2 the kills leaderboard, page 2
/top types every type with its requirements
Below the list, the player sees their own place, and arrows to move between pages.
The types
| Type | Sorted by | Requirements by default |
|---|---|---|
rating | Rating | 10 kills, 5 games, active in the last 30 days |
kills | Kills | 1 kill, 20 AFK kills at most |
kdr | Kills divided by deaths | 5 kills, 1 death, active in the last 60 days |
streak | Best kill streak | 3 kills, a best streak of 3, active in the last 45 days |
wins | Wins | 1 game, active in the last 30 days |
winrate | Win percentage | 10 games, active in the last 45 days |
A game is a win or a loss, so kills plus deaths.
Requirements
Each type has a requirements section. A player who does not meet them is left out of that
leaderboard and sees why.
| Key | Default | Meaning |
|---|---|---|
minimumKills | 0 | At least this many kills |
minimumDeaths | 0 | At least this many deaths |
minimumGames | 0 | At least this many wins plus losses |
minimumRating, maximumRating | no limit | Rating within this range |
requireRecentActivity | false | Must have fought recently |
activityDays | 30 | How recently, in days |
excludeAfkFarmers | false | Leave out players with many AFK kills |
maxAfkKills | 10 | How many AFK kills are allowed |
minimumStreakEver | 0 | A best kill streak of at least this |
excludeCombatLoggers | false | Leave out players who logged out in combat often. The count is not kept in 2.0.0, so this has no effect |
maxCombatLogouts | 5 | How many combat logs are allowed |
Adding a type
Each type points at a column of the player table:
leaderboardSettings:
types:
damage:
displayName: Damage Dealers
column: total_given_damage
title: Damage
unit: damage
description: Most damage dealt
requirements:
minimumKills: 5
requireRecentActivity: true
activityDays: 14
| Key | Meaning |
|---|---|
| The section name | What players type: /top damage |
displayName | Shown as {type} in the header |
column | The column to sort by, highest first |
title, unit | Shown next to values, {unit} in entryFormat |
description | Shown in /top types |
Columns you can sort by: kills, deaths, kdr, wins, losses, win_rate, rating,
peak_rating, lowest_rating, total_rating_gained, total_rating_lost, current_kill_streak,
best_kill_streak, total_kill_streaks, daily_kills, daily_deaths, total_given_damage,
total_received_damage, total_combat_time, total_critical_hits, critical_hit_rate.
Looks
| Key | Default | Meaning |
|---|---|---|
entriesPerPage | 10 | Lines per page |
maxPaginationPages | 50 | The last page anyone can open |
header, entryFormat, footer | The list. entryFormat takes {rank}, {player}, {value}, {unit} | |
enableMedalEmojis | true | Put the goldMedal, silverMedal and bronzeMedal symbols before the first three places. Every place is written as defaultRankPrefix (#) and the number |
showPlayerRankByDefault | true | Show the viewer's own place under the list, with playerRankMessage |
enableNavigation | true | Show the clickable previousButton and nextButton |
showCacheInfo | true | Add a line saying the data is cached |
showRequirementsInHelp | true | List requirements in /top types |
enableLoadingMessage | true | Show loadingMessage while a page is read from the database |
requirementNames | The words used when requirements are listed |
The cache
Leaderboards are read from the database and kept in memory for cacheTimeMinutes (5). So a kill
shows on /top within 5 minutes, not at once. updateRealTime: true clears the cache after every
counted kill, which costs a database query per /top on a busy server.
PlaceholderAPI leaderboard placeholders keep their own cache for papiCacheTimeSeconds (30). See
Placeholders.
| Command | Does |
|---|---|
/top cache stats | Shows how often the cache answered |
/top cache clear (type) | Empties the cache, of one type or all |
/top cache warmup | Reads every type into the cache now, for example after a restart |
Related: Statistics and Rating, Commands
Was this page helpful?