The ability to create separate rewards for daily, weekly, and monthly leaderboards has been added. (If you already created rewards, you must move them into each time path).
For optimization purposes, a placeholder has been added to return the full top line (editable from the language files). This avoids making two separate PlaceholderAPI calls to get both name and amount.
Since each top has different update times, users may get confused, so two new placeholders have been added. Their format can be edited in the configuration.
You can now give rewards to top players. If the player is online, the reward is given instantly; if offline, they receive it when they reconnect. If you update the rewards file while they're offline, they will receive the updated reward.
Improvements:
Added a configurable message in lang.yml to translate "Loading" when a leaderboard is displayed.
Improved the detection of leaderboard resets, which sometimes failed to execute correctly.
Added a command to forcibly reset the top, useful for testing functionality. /xlb forcereset daily
Leaderboards now fetch fresh data from the cache when updated, so changes appear instantly in placeholders.
Added an option to save data of online players when the leaderboards update. This parses and saves placeholders of all connected players for instant updates. Recommended for servers with 50 - 100 players online. Not recommended for servers with 500+ players.
Code (YAML):
enabled: false
rewards:
kills:
top1:
top: 1
rewards:
- "command: give <player> diamond_sword
" - "message
: &7 &a
" - "center_message
: &6&lTOP &e
#<top> &6&lKILLS &f&l<amount>" - "message: &7 &d
" - "message
: &7You have received a diamond sword for staying in top!
" - "message
: &7 &a
" top2: top: 2 rewards: - "command
: give <player> iron_sword
" - "message
: &7 &a
" - "center_message
: &6&lTOP &e
#<top> &6&lKILLS &f&l<amount>" - "message: &7 &d
" - "message
: &7You have received a iron sword for staying in top!
" - "message
: &7 &a
" top3: top: 3 rewards: - "command
: give <player> stone_sword
" - "message
: &7 &a
" - "center_message
: &6&lTOP &e
#<top> &6&lKILLS &f&l<amount>" - "message: &7 &d
" - "message
: &7You have received a stone sword for staying in top!
" - "message
: &7 &a
"
XLeaderBoards has been completely reworked to support both SQLite and MySQL, allowing for a highly optimized leaderboard capable of handling over 2 million players efficiently and quickly.
Command improvements: it may sound minor, but the previous version lacked tab-completion and even a /reload command. These essential features have now been added.
Folia is gradually becoming a standard for high-performance Minecraft servers on newer versions. Just like StellarProtect, XLeaderBoards now fully supports it.
Although XLeaderBoards doesn't rely on NMS, some internal methods may vary between versions. Full version compatibility has been ensured, including support for 1.21.4 through 1.21.8.