Placeholders & Panel Commands

Find the list of placeholders and how to add a command to a panel

Placeholders

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

Player
Material
Data/Math
Miscellaneous
Other Plugins
Player

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.

Material

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.

Data/Math

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-setdata-playerMoney,+1%

%cp-random-MIN,MAX%

Outputs a random number based on the minimum and maximum integers, eg, %cp-random-1,10%.

Miscellaneous

Placeholder

Description

%cp-online-players%

Amount of players online

%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.

Other Plugins

Placeholder

Description

%cp-tokenmanager-balance%

Players Token Balance (needs TokenManager)

%cp-votingplugin-points%

Amount of points the player has (needs VotingPlugin)

Panel Commands

Allows you to issue the command /example OR /ex OR /e to open the Panel. Custom commands can be changed to anything you want for each Panel. Unlike item commands, these commands are located at the top of the panel, near the title and rows. If you wish to register the command so that they autocomplete, you will need to restart the server for changes to save.

commands:
- example
- ex
- e

If you wish to add variables into your commands, for example creating a Ban GUI, that can be done using placeholders. Simply place a placeholder in your command, make sure the placeholder starts with %cp- and the rest can be whatever you want. (You can have multiple placeholders, they need to be separate words however).

commands:
- ban %cp-chosenPlayer%

The above example allows you to enter one argument, /ban <player name> Then the placeholder, in this case it would be %cp-chosenPlayer% can be used in the panel freely.