Features
In-Game Leaderboards
Discover how to implement custom leaderboards from Analyse on your server.
Starting with version 2.0+, presenting leaderboards on your server has been made seamless, negating the need to handle MySQL databases or connections. If you don't already have it, you'll need the PlaceholderAPI plugin which you can download here.
Once that's done, you can showcase a leaderboard using the following placeholder:
%analyse_<leaderboard>_<position>_<username/value>%
For example, if you had a gems
placeholder and wanted to display the top players, you may display it in-game like:
%analyse_gems_1_username% - %analyse_gems_1_value%
This would display the top player's username and their value. You can then change the 1 to reflect the position number.
You could take it a step further using a holograms plugin such asDecentHolograms. We could display it like so...
pages:
- lines:
- content: '&b[Analyse] Leaderboard for &f&nKills'
height: 0.3
- content: '&7'
height: 0.3
- content: '&7#1 &8- &f%analyse_kills_1_username% &8- &e%analyse_kills_1_value%'
height: 0.3
- content: '&7#2 &8- &f%analyse_kills_2_username% &8- &e%analyse_kills_2_value%'
height: 0.3
- content: '&7#3 &8- &f%analyse_kills_3_username% &8- &e%analyse_kills_3_value%'
height: 0.3
- content: '&7#4 &8- &f%analyse_kills_4_username% &8- &e%analyse_kills_4_value%'
height: 0.3
actions: {}
Then we would get a result like this:
Boom! You're done. It's that easy.