Requirement Tags
Requirement Tags are used to define conditions that must be met before commands can run. These tags are checked and transactions are made before the commands run.
They are used in the requirements:
section of Click Actions.
Requirement Tags List
The following table outlines built-in requirement tags provided by CommandPanels:
Tag Syntax | Description |
---|---|
[vault] price | Requires the player to have a certain balance. Deducts the amount if passed. |
[item] source=player/panel remove= true/false material=STONE custom=1045 model=template:sword amount=5 | Require items from the player or from items the player placed inside the panel. model= is for ItemModel and custom= is for CustomModelData. Remove is true by default, set to false to do check but not remove the item after. |
[xp] levels:points amount | Requires the player to have a certain amount of xp. Deducts the amount if passed. |
[data] key amount | Data must be a number, take away data if the player has enough. |
Example
To charge a player 100 when they click a button:
- '[vault] 100'
This will:
- Check if the player has at least 100 in their balance.
- Deduct 100 if the requirement is met.
- Run fail commands if the requirement fails.
info
For tags such as the [vault]
tag to function, your server must have Vault or other associated plugins installed.