PAPi Examples

Configure new Statistics (leaderboard using PAPi)

First you need to make sure placeholder you're using is dependent on player and that it returns basic number. (allowed formats: 0, 0.0 it cannot be text!) (good expansion for many statistics: https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Placeholders#statistic)

Second, you have to stop the server. After you stopped the server navigate to: server-root/plugins/HolographicPlaceholders folder. Where you'll see the following files:

  • config.yml

  • signs.yml

  • data.yml

To configure new leaderboard you have to open config.yml (notepad++ program is recommended for better readability). In config.yml you'll see the following settings:

  • system ( edited by the plugin do not edit)

  • addons (here you can enable different addons provided by the plugin)

  • placeholder-addons (you need to edit this part for custom leaderboards)

  • All other addons such as (PAPi, Baltop, baltopv2)

  • and config version

You have to go to section placeholder-addons (it should be something like provided code block):

placeholder-addons: # so basicly you can only use signs for expansions here:
# just make sure to restart server after you edit those values :)
  '%statistic_deaths%': #From here also known as name
    size: 10 # size of leaderboard you can have INF number of positions 
    interval: 200.0 # how often is leaderboard updated in ticks (1 second = 20 ticks)
    value: number # if time in seconds use "time" instead of "number"
    format: 1 # Number format 1 no format, 2 = format with dots and comas, 3 = format with letters (k,M,T...)
    signs: false # enable this if you want to display leaderboard on signs
    heads: false # enable this if you want to display heads of leaderboard
    placeholder-delay: 10 # How often are the placeholders of the leaderboard updated
    # to here

To add new leaderboard you can copy the configuration (marked as from here, to here, on the code block), now search for your desired placeholder (if you haven't already). And replace the name of addon (marked on code block) After that you can configure other sections of the settings such as size, interval. If your placeholder returns time (must be in seconds) you can cange value type to time instead of number. After you complete the setup you can start the server.

Placeholders you now use on hologram are:

  • {hpe-<papi placeholder without %%>-#-user}

  • {hpe-<papi placeholder without %%>-#-value}

Replace the # with the position on the leaderboard (1,2,3,4,5...)

Example of placeholders for the provided code block:

  • {hpe-statistics_deaths-1-user} - displays name of the top 1 user on deaths leaderboard

  • {hpe-statistics_deaths-1-value} - displays the deaths of the top 1 user on leaderboard

Last updated