SwiftCore Leaderboard — Overview
SwiftCoreLeaderboard is a standalone add-on for SwiftCore. It gives players a modern, in-game ranked leaderboard UI without putting that logic inside the main plugin. It reads SwiftCore’s ranked data (database + kitsrank.yml + tier config), shows it in Paper’s Dialog API, and stays fast through layered caching.What it does
Players open a leaderboard that looks like a competitive ranked screen: top 10 per kit/category, overall global ranked, player skins/heads, tier names, points, and per-kit breakdowns. They can:- Switch between kit categories (Sword, Pot, Mace, Overall, etc.)
- Search by player name
- Click a row to open a profile view
- From profile: spectate or party invite (configurable commands)
- See their own stats even when they are not in the top 10
Requirements
| Dependency | Required? | Role |
|---|---|---|
| SwiftCore | Yes (by default) | Ranked DB, tiers, kit display names, SwiftCoreApi |
| Paper 1.21+ | Yes | Dialog API, MiniMessage <head> tags |
| PlaceholderAPI | Optional | Extra placeholders in entry lore (per-row player context) |
UI: Paper Dialogs (not chest GUIs)
The leaderboard uses Paper Dialogs, not a 54-slot chest inventory:- Non-pausing dialogs (pause: false) so the game does not freeze incorrectly
- Multi-action layout: each top player is a clickable row
- Inline player heads via MiniMessage <head:%uuid%:true> (with sanitization for offline/cracked names)
- Category sprites in controls (e.g. <sprite:items:item/diamond_sword>)
- In-dialog search (text input + apply/clear)
- Profile sub-dialog with spectate / invite / back
