Skip to main content

Top Players

Three commands access the balance ranking, all backed by TopCacheService:

TopCacheService — Asynchronous Architecture

Never calculates the top on the player event thread. Instead:

Configuration

  • refresh_seconds — period of the runTaskTimerAsynchronously. Minimum value 1s (internally Math.max(1L, x)).
  • change_threshold: 0 — aggressive invalidation on every admin op (/eco set/give/take/reset).

Manual Invalidation

Both trigger an async refreshAll() in the background.

TopEntry Structure

Each ranking entry:

Linked Placeholders

PlaceholderAPI (if installed) reads directly from TopCacheService:

CLI Pagination

Commands return 10 results per page. Limit calculation is done in each command handler; if page ≤ 0 page 1 is assumed. The rankByUuid cache (Map UUID → rank) enables O(1) lookups for “what rank does player X hold?” via getRankNumber(currencyId, uuid).