Leaderboards
Every currency has a top-balances list, available as a command, a menu, and placeholders.
Command and menu
/obfeco top [page]
- Players with
obfeco.top.guiget a 45-slot menu with 21 players per page and arrows to page through it. - Everyone else (and the console) gets a chat list, 10 players per page, using the
top.header,top.entryandtop.footerlines frommessages.yml.
Both need obfeco.top.
Placeholders
The top 100 of each currency are available through PlaceholderAPI:
%obfeco__top_name_%
%obfeco__top_balance_%
%obfeco__top_raw_%
Positions past the end of the list return --- for names and 0 for balances. Full list on the
PlaceholderAPI page.
How fresh is it?
Leaderboards read saved balances from storage, and the result is cached for
placeholder.top-cache-minutes (default 5). Two things decide how quickly a change shows up:
- Balances are written to storage every
cache.batch-save-intervalseconds (default120) and when a player quits. - The cached list refreshes in the background once it's older than
top-cache-minutes. A placeholder never waits for it; it shows the previous list until the new one is ready.
So a fresh /obfeco give can take a few minutes to move someone up the board. Lower either value
for a more live board at the cost of more database queries. See
Performance Guide.
The _total_ placeholders (total of a currency across all players) follow the same rules.