Placeholders

Find the list of placeholders

Built-in Placeholders

If you want to use CommandPanels placeholders inside of other placeholders you can use the secondary symbols found in the config. For example, %cp-data-bans,{cp-player-name}%

Below is an example of how you can change the placeholder symbols for a specific panel. Adding this into the panel will change the symbols for only that panel.

placeholders:
  primary:
    start: $
    end: $
  secondary:
    start: '{'
    end: '}'

Placeholder

Description

%cp-player-displayname%

Players Display Name

%cp-player-name%

Players Name

%cp-player-x%

Players X Position

%cp-player-y%

Players Y Position

%cp-player-z%

Players Z Position

%cp-player-input%

Used in conjunction with the player-input command sections in items

%cp-player-world%

World name the player is located

%cp-player-balance%

Players Balance (needs an economy & Vault)

%cp-player-online-1%

You can change the number 1, to any number, it will check server slots and find the player in that slot. If you are the only one online and use the number 1, It will show up as yourself. If you then make it 2, it will show offline, since there is only one player on the server.

%cp-player-online-1-visible%

This will ignore players that are vanished by checking for the vanished metadata.

External Placeholders

Follow this guide if you want to use any of the above built-in placeholders in other plugins. You will need to have Placeholder API for this to work. The other plugin will also need to support Placeholder API too. Simply take the placeholder from above and change the syntax, take the following examples:

Before 1: %cp-data-example% Before 2: %cp-setdata-example,test1%

After 1: %commandpanels_data-example% After 2: %commandpanels_setdata-example,test1%

As you can see, all you need to do is replace the cp- in the placeholder with commandpanels_

Last updated