Command Tags
Command Tags allow you to perform advanced actions from panels using commands defined in YAML configuration files. They are used in actions: sections across buttons, inputs, and panel events.
These tags are executed when an action is triggered (e.g. a button is clicked or a panel is opened), and provide functionality beyond just running normal commands.
Command Tag List
The following table lists the available Command Tag types and their functions.
| Tag Syntax | Description |
|---|---|
| [open] panelName | Opens another panel by name. |
| [close] | Closes the current panel. |
| [refresh] | Re-renders the current panel (useful for dynamic content). |
| [previous] | Opens the previously open panel in the current session. |
| [console] command | Executes the specified command from the server console. |
| [give] material amount | Simple tag to give players items. Items drop on the ground if there's no space. |
| [delay] ticks | Enter a number and commands under this command will be delayed (measured in ticks). |
| [chat] /command | Sends a command or chat as the player (e.g., /msg). |
| [grant] permission /command | Sends a command or chat as the player. Enter a permission node and it will force grant that permission temporarily while executing the command or chat. |
| [msg] message | Sends a message to the player. Supports color codes and placeholders. |
| [server] serverName | Use Velocity or Bungeecord to send player to another server. |
| [sound] sound volume=num pitch=num category=num | Play sounds with optional volume settings. |
| [stopsound] sound | Stops the chosen sound from playing. |
| [teleport] x y z world=name yaw=num pitch=num player=name | Teleport player with optional arguments. |
| [itemaction] enchant slot add/remove/clear enchantment level | Enchant an item placed in the Panel. |
| [itemaction] repair slot | Repair an item placed in the Panel. |
| [itemaction] amount slot num | Chang the amount of an item stack in the Panel. |
| [itemaction] remove slot | Removes an item placed in the Panel. |
| [session] set key value | Stores a key-value pair in session data (temporary until panel close). |
| [session] del key | Deletes a key from session data. |
| [data] set key value | Stores a key-value pair in persistent data (data.yml). |
| [data] overwrite key value | Overwrites an existing key in data.yml. |
| [data] math key expression | Modifies the numeric value at a key using a math expression. |
| [data] del key | Deletes a key from persistent data. |
| [data] clear | Clears all persistent data for the player. |
Example
To set a session variable named playerName to the value of %player_name%, use:
- '[session] set playerName %player_name%'
To open a panel called confirm_panel after closing the current one. This will not reset session data as the plugin knows when panels are opened from another panel.
- '[close]'
- '[open] confirm_panel'
You can chain multiple command tags in the commands section to create complex behaviors.