-
Notifications
You must be signed in to change notification settings - Fork 6
features top players
Config Plugins edited this page Sep 3, 2026
·
3 revisions
Three commands access the balance ranking, all backed by TopCacheService:
| Command | Permission | Description |
|---|---|---|
/vaultop [page] |
vault.top |
Quick alias command (default true) |
/vault top [p] |
vault.eco.top |
Admin sub-command |
/eco top [p] |
vault.eco.top |
Sub-command within /eco (OP default) |
Never calculates the top on the player event thread. Instead:
Bukkit Async Scheduler (every refresh_seconds)
β
build() β snapshotBalances() for each currencyId
sorted DESC by balance
Bukkit.getOfflinePlayer(uuid) to resolve names
β
CachedTop { List<TopEntry>, rankByUuid: Map<UUID,Integer> }
β
ConcurrentHashMap caches.put(currencyId, cached)
top:
refresh_seconds: 300 # recalculate every 5 min (300 s)
change_threshold: 0 # invalidate cache only if |Ξ| > threshold-
refresh_secondsβ period of therunTaskTimerAsynchronously. Minimum value1s(internallyMath.max(1L, x)). -
change_threshold: 0β aggressive invalidation on every admin op (/eco set/give/take/reset).
TopCacheService.invalidateAll() β clears all currencies
TopCacheService.invalidate(currencyId) β clears one specific currency
Both trigger an async refreshAll() in the background.
Each ranking entry:
class TopEntry {
int rank; // 1-based
UUID uuid;
String name; // OfflinePlayer.getName() or UUID[:8]
double balance; // raw unformatted value
}PlaceholderAPI (if installed) reads directly from TopCacheService:
| Placeholder | Returns |
|---|---|
%vault_top% |
Multi-line formatted top 10 |
%vault_top_<n>% |
Full line for position n |
%vault_top_name_<n>% |
Player name at position n |
%vault_top_amount_<n>% |
Formatted balance of player at position n |
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).
Vault Economy v2.1.0 Β· Compatible with Spigot 1.8.8 β 1.21.x
π¦ Modrinth Β·
π¬ Discord Β·
Java 17 (legacy) Β· Java 21 (modern)
Documentation generated on 2026-09-03 Β· Vault Project Team
- π Home
- π First Install
- π§βπ« Getting Started
- β Basic FAQ
- π Formats and Localization
- π± Multi-currency
- π’ Abbreviation (k / M / B / T)
- π Complete Command List
- π‘οΈ Complete Permission List
- βοΈ config.yml Reference
- π Supported Languages
- π Modrinth Updates
- π° Player-to-Player Payments
- π¦ Bank System
- π΅ Physical Notes
- πΈ Loans
- π Transaction History
- π Top Players
- βΈοΈ Offline Payments
- π³ Charges / Payment Requests
- π Discord Webhook
- π οΈ Installation Errors
- π« Players Can't Pay
- 𧨠Balances Wiped on Restart
- π Bank Doesn't Pay Interest
- π§Ύ Invalid / Expired Notes
- π©Ί Complete Step-by-Step Troubleshooting
- πΊοΈ Separate Balances Per World
- π Migration from EssentialsX
- π PlaceholderAPI (25+ placeholders)
- π€ SkinsRestorer Β· GUI Heads
- π LuckPerms
- ποΈ MySQL / HikariCP
-
Java API
- π¬ Getting Started
- π‘ Events and Transactions
- π SimpleEconomy Hooks
- π Skript
- π§° Contribute Β· Dual Maven Build
- π Changelog v2.1.0
- π Support