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.
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.
Placeholder
Description
%cp-material-<slot>%
Choose a slot in the panel for the number, it will return the material from that slot. If your Minecraft version is a legacy version (1.12 or below) the material will appear with the ID at the end: WOOD:5
%cp-nbt-<slot:key>%
Choose a number in the panel for the GUI slot, then choose the key (title) of your NBT tag in the key section for the placeholder to output the NBT tag's value.
%cp-stack-<slot>%
Choose a slot in the panel for the number, it will return the stack size from that slot.
%cp-damaged-<slot>%
Choose a slot in the panel for the number, it will return true if the item you chose is damaged, false if it is not.
%cp-modeldata-<slot>%
This will return the model data value of the item you choose in the GUI.
%cp-identical-<custom item>,<slot>%
This placeholder can be used to determine if an item in the panel is identical to an item that is in the panels custom-items section.
Placeholder
Description
%cp-data-<dataName>%
This will get the value of a players data. If the player does not have data saved to that name it will not change the placeholder into a value.
%cp-data-<dataName>,<playerName>%
This will get the value of a players data. This placeholder, however, includes a player name section as you can choose which players data you wish to view.
%cp-setdata-<dataName>,<dataValue>%
This will allow you to change data values via a placeholder. This way you can allow data to change without having to click items. (similar to set-data=) %cp-setdata-playerTeam,yellow%
%cp-mathdata-<dataName>,<dataValue>%
This will allow you to change mathematical data values via a placeholder. (similar to math-data=) %cp-mathdata-playerMoney,+1%
%cp-random-MIN,MAX%
Outputs a random number based on the minimum and maximum integers, eg, %cp-random-1,10%.
Placeholder
Description
%cp-online-players%
Amount of players online
%cp-online-players-visible%
Players online discluding vanished players. Checks for metadata containing the word vanished.
%cp-panel-position%
Returns either Top, Middle or Bottom based on the location of the panel the placeholder is being executed in.
%cp-clicked%
The material that was clicked in the Panel. (Command Section Only)
%cp-tag%
Display the tag for the plugin. By default, it is [CommandPanels].
%cp-server-<IP>:<PORT>%
Outputs "true" if the specified server is online, and "false" if the specified server is offline.
Placeholder
Description
%cp-tokenmanager-balance%
Players Token Balance (needs TokenManager)
%cp-votingplugin-points%
Amount of points the player has (needs VotingPlugin)
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_