DUXPLIMA Documentation

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

TypeSorted byRequirements by default
ratingRating10 kills, 5 games, active in the last 30 days
killsKills1 kill, 20 AFK kills at most
kdrKills divided by deaths5 kills, 1 death, active in the last 60 days
streakBest kill streak3 kills, a best streak of 3, active in the last 45 days
winsWins1 game, active in the last 30 days
winrateWin percentage10 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.

KeyDefaultMeaning
minimumKills0At least this many kills
minimumDeaths0At least this many deaths
minimumGames0At least this many wins plus losses
minimumRating, maximumRatingno limitRating within this range
requireRecentActivityfalseMust have fought recently
activityDays30How recently, in days
excludeAfkFarmersfalseLeave out players with many AFK kills
maxAfkKills10How many AFK kills are allowed
minimumStreakEver0A best kill streak of at least this
excludeCombatLoggersfalseLeave out players who logged out in combat often. The count is not kept in 2.0.0, so this has no effect
maxCombatLogouts5How 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
KeyMeaning
The section nameWhat players type: /top damage
displayNameShown as {type} in the header
columnThe column to sort by, highest first
title, unitShown next to values, {unit} in entryFormat
descriptionShown 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

KeyDefaultMeaning
entriesPerPage10Lines per page
maxPaginationPages50The last page anyone can open
header, entryFormat, footerThe list. entryFormat takes {rank}, {player}, {value}, {unit}
enableMedalEmojistruePut the goldMedal, silverMedal and bronzeMedal symbols before the first three places. Every place is written as defaultRankPrefix (#) and the number
showPlayerRankByDefaulttrueShow the viewer's own place under the list, with playerRankMessage
enableNavigationtrueShow the clickable previousButton and nextButton
showCacheInfotrueAdd a line saying the data is cached
showRequirementsInHelptrueList requirements in /top types
enableLoadingMessagetrueShow loadingMessage while a page is read from the database
requirementNamesThe 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.

CommandDoes
/top cache statsShows how often the cache answered
/top cache clear (type)Empties the cache, of one type or all
/top cache warmupReads every type into the cache now, for example after a restart

Related: Statistics and Rating, Commands