> For the complete documentation index, see [llms.txt](https://enchantedmobs.superiormc.cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://enchantedmobs.superiormc.cn/for-ultimatequest/configuration/actions/commands-world.md).

# Commands and World Actions

Configure these entries under a menu button/entry actions node. See the [common action format](/for-ultimatequest/configuration/actions.md).

## `console_command`

Executes a command as the console.

| Field     | Default  | Description                    |
| --------- | -------- | ------------------------------ |
| `command` | Required | Command without leading slash. |

```yaml
type: console_command
command: uq info miner {player}
```

Commands run on each eligible click.

## `player_command`

Executes a command as the clicking player.

| Field     | Default  | Description                    |
| --------- | -------- | ------------------------------ |
| `command` | Required | Command without leading slash. |

```yaml
type: player_command
command: uq info miner
```

Commands run on each eligible click.

## `op_command`

Executes through the temporary-OP command path.

| Field     | Default  | Description                    |
| --------- | -------- | ------------------------------ |
| `command` | Required | Command without leading slash. |

```yaml
type: op_command
command: uq info miner
```

Commands run on each eligible click.

## `command`

Menu-compatible command alias.

| Field        | Default  | Description                    |
| ------------ | -------- | ------------------------------ |
| `command`    | Required | Command without leading slash. |
| `as-console` | true     | False executes as the player.  |

```yaml
type: command
command: uq info miner {player}
as-console: true
```

Prefer explicit console\_command/player\_command for new configurations.

## `teleport`

Teleports the player to a world coordinate.

| Field         | Default                 | Description         |
| ------------- | ----------------------- | ------------------- |
| `world`       | Required                | Loaded world name.  |
| `x / y / z`   | Required                | Target coordinates. |
| `yaw / pitch` | Current player rotation | Target orientation. |

```yaml
type: teleport
world: world
x: 0.5
y: 80
z: 0.5
```

Teleports the clicking player to the configured location.

## `entity_spawn`

Spawns an entity at the player or supplied coordinates.

| Field               | Default         | Description                                              |
| ------------------- | --------------- | -------------------------------------------------------- |
| `entity`            | Required        | Bukkit entity type.                                      |
| `world / x / y / z` | Player location | Supply all location fields when using a custom location. |

```yaml
type: entity_spawn
entity: VILLAGER
```

This does not spawn a MythicMobs ID through the entity field.
