TDXPlugins
TDX VotePlusConfiguration

leaderboard

Cached top-N per period, refresh interval, GUI size.

leaderboard.yml controls the in-game /vote top leaderboard — how many places to track, how often to refresh, and which periods are exposed.

The vote leaderboard GUI

The paginated leaderboard with Total / Monthly / Weekly / Daily tabs.

Quick example

plugins/TDXVotePlus/leaderboard.yml
leaderboard:
  enabled: true
  size: 50                # how many places to cache + display
  refresh-interval: 300   # seconds between background refreshes

  periods:
    total: true
    monthly: true
    weekly: true
    daily: true

Reference

KeyTypeDefaultNotes
enabledbooleantrueMaster switch for the /vote top command and GUI.
sizeint50How many top players to cache. The GUI is paginated, so a larger number is fine.
refresh-intervalint300Seconds between background cache refreshes. Lower = fresher, higher = less DB load.
periods.totalbooleantrueInclude the all-time tab.
periods.monthlybooleantrueInclude the monthly tab.
periods.weeklybooleantrueInclude the weekly tab.
periods.dailybooleantrueInclude the daily tab.

How the cache works

The leaderboard is not computed on every /vote top open — that would mean a SELECT-with-ORDER-BY against the entire votes table, every click. Instead, the plugin maintains an in-memory cache that's refreshed in the background every refresh-interval seconds on a single async task.

This means:

  • /vote top is essentially free — it's reading a sorted list already in RAM.
  • Top-N PlaceholderAPI placeholders (%tdxvoteplus_top1_name%, etc.) are also lock-free reads against the same cache.
  • The leaderboard is up to refresh-interval seconds out of date. This is almost always fine; if you need it instant, drop refresh-interval to 60 or run /voteplus refresh manually.

On busy networks running MySQL with pool-size near its cap, a refresh-interval of 60 will burn a connection slot every minute per backend. The default of 300 is a good balance — most players don't notice a 5-minute delay on a leaderboard, and you save the DB some work.