Skip to content

Creating Leaderboards

Cervinakuy edited this page Apr 25, 2021 · 2 revisions

Description

Leaderboards display information about top players and their stats. The currently tracked stats are as follows:

  • Kills
  • Deaths
  • Level

To enhance server performance, leaderboards for the items mentioned above update upon their respective event. Meaning, the Kills Leaderboard updates upon any new kill, the Deaths Leaderboard updates upon any new death, and the Levels Leaderboard updates upon any new level up.

Usage

To maximize the potential usage of the leaderboards, KitPvP displays leaderboard information through PlaceholderAPI placeholders. That way, they can be implemented in every plugin that supports PlaceholderAPI.

The placeholder format is as follows:
%kitpvp_top_<stats type>_<player OR amount>_<rank>%

Example Placeholders

%kitpvp_top_kills_player_1%
%kitpvp_top_kills_amount_1%

%kitpvp_top_deaths_player_1%
%kitpvp_top_deaths_amount_1%

%kitpvp_top_level_player_1%
%kitpvp_top_level_amount_1%

Placeholders using the player tag will display a username, while others using amount will display the respective stat amount.

These placeholders can be directly inserted into any PlaceholderAPI-supporting plugin. A very popular usage of leaderboards is using holograms, which can also be accomplished with the above placeholders.