> 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/ultimatequest-zhong-wen-wen-dang/pei-zhi/actions/commands-world.md).

# 命令与世界动作

条目放在菜单按钮/内容动作节点，见[公共格式](/ultimatequest-zhong-wen-wen-dang/pei-zhi/actions.md)。

## `console_command`

以控制台执行命令。

| 字段        | 默认值 | 说明         |
| --------- | --- | ---------- |
| `command` | 必填  | 不含开头斜线的命令。 |

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

每次满足条件的点击都会执行此命令。

## `player_command`

以点击玩家执行命令。

| 字段        | 默认值 | 说明         |
| --------- | --- | ---------- |
| `command` | 必填  | 不含开头斜线的命令。 |

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

每次满足条件的点击都会执行此命令。

## `op_command`

通过临时 OP 命令路径执行。

| 字段        | 默认值 | 说明         |
| --------- | --- | ---------- |
| `command` | 必填  | 不含开头斜线的命令。 |

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

每次满足条件的点击都会执行此命令。

## `command`

菜单兼容命令写法。

| 字段           | 默认值  | 说明           |
| ------------ | ---- | ------------ |
| `command`    | 必填   | 不含开头斜线的命令。   |
| `as-console` | true | false 时玩家执行。 |

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

新配置可优先使用明确 console\_command/player\_command。

## `teleport`

传送玩家至世界坐标。

| 字段            | 默认值    | 说明      |
| ------------- | ------ | ------- |
| `world`       | 必填     | 已加载世界名。 |
| `x / y / z`   | 必填     | 目标坐标。   |
| `yaw / pitch` | 玩家当前朝向 | 目标朝向。   |

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

将点击者传送到配置的位置。

## `entity_spawn`

在玩家处或配置位置生成实体。

| 字段                  | 默认值             | 说明              |
| ------------------- | --------------- | --------------- |
| `entity`            | 必填              | Bukkit 实体类型。    |
| `world / x / y / z` | Player location | 自定义位置时填写全部位置字段。 |

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

entity 字段不用于 MythicMobs ID。
