> For the complete documentation index, see [llms.txt](https://xerickerspigot.gitbook.io/arenalegends/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xerickerspigot.gitbook.io/arenalegends/menus/click-commands.md).

# Click Commands

Command lists run on purchase, claim, or another configured action.

## Where commands live

| File                     | Key                                                                       |
| ------------------------ | ------------------------------------------------------------------------- |
| Shop and mythic items    | `command`                                                                 |
| Finishers                | `executor.commands`                                                       |
| Battle Pass tier rewards | `tiers.<tier>.free` and `tiers.<tier>.premium` → `item-settings.commands` |

```yaml
command:
  - "console->al modificator {PLAYER} GOLD +2000"
```

{% hint style="warning" %}
`item-settings.commands` inside `/menus/` files is parsed but never executed. Menu clicks are handled by the menu code.
{% endhint %}

## Executors

| Prefix      | Executor                           |
| ----------- | ---------------------------------- |
| `player->`  | The player involved in the action. |
| `console->` | Server console.                    |

A command without a prefix runs from the console, so `console->` is optional.

## Examples

As the player:

```yaml
command:
  - "player->spawn"
```

As console:

```yaml
tiers:
  1:
    free:
      item-settings:
        commands:
          - "console->al globalstatistic {PLAYER} GEMS +60"
```

{% hint style="warning" %}
Use `player->` and `console->`. Older examples with brackets around the executor no longer work.
{% endhint %}

## Placeholders

Commands use the same placeholder system as menus, so player placeholders always resolve:

```
{PLAYER}
{UUID}
{GOLD_BALANCE}
```

Battle Pass, statistic, and timestamp placeholders resolve when the matching data is available. When PlaceholderAPI is installed, `%...%` placeholders also resolve.

`timer-command.*` in `/game.yml` is a separate list that always runs from the console.
