diff --git a/docs/Commands.md b/docs/Commands.md index 352c4b2..c2c337b 100644 --- a/docs/Commands.md +++ b/docs/Commands.md @@ -166,43 +166,3 @@ This command type takes a weighted list of other commands and randomly executes } ``` ::: - -### `commander:store_expression_data` and `commander:store_nbt_data` - -These commands allows you to write data to a Commander data storage. This is a JSON variant of the [`/cmd:data`](/BrigadierCommands#cmd-data) command. - -Both commands require the following arguments: - -| Argument | Description | -|---|---| -| `target` | The target that you want to write data to. Can be `level`, `chunk`, `entity`, `block_entity`. | -| `selector` | A regular selector which selects the target of specified type. | -| `key` | The identifying key of the data you want to store | - -The `nbt` command requires a static number or a string. (`element` field) - -The `expression` command requires an expression which returns a number or a string. (`expression` field) - -::: details Example -```json -{ - "type": "commander:store_expression_data", - "target": "level", - "selector": "origin", - "key": "cmd_my_cool_data", - "expression": "random(0, 2)" -} -``` - -
- -```json -{ - "type": "commander:store_nbt_data", - "target": "entity", - "selector": "this_entity", - "key": "cmd_my_cool_data", - "element": 45 -} -``` -::: diff --git a/docs/zh-cn/Commands.md b/docs/zh-cn/Commands.md index b0061a0..317d07a 100644 --- a/docs/zh-cn/Commands.md +++ b/docs/zh-cn/Commands.md @@ -165,43 +165,3 @@ $(bool){{0}} 0 -> false } ``` ::: -::: - -### `commander:store_expression_data` 和 `commander:store_nbt_data` - -你可以通过它们将数据写入本模组的数据存储中。它们是 JSON 版本的 [`/cmd:data`](/zh-cn/BrigadierCommands#cmd-data) 命令。 - -这两个命令都需要以下实际参数: - -| 实际参数 | 描述 | -|---|---| -| `target` | 写入数据的目标。可以是 `level`(存档),`chunk`(区块),`entity`(实体),`block_entity`(方块实体)。 | -| `selector` | 用来选择指定种类的常规选择器。 | -| `key` | 被存储数据的标识用键值。 | - -`nbt` 命令需要一个静态数或字符串(`element` 字段)。 - -`expression` 命令需要一个能返回数字或字符串的表达式(`expression` 字段)。 - -::: details 示例 -```json -{ - "type": "commander:store_expression_data", - "target": "level", - "selector": "origin", - "key": "cmd_my_cool_data", - "expression": "random(0, 2)" -} -``` - -
- -```json -{ - "type": "commander:store_nbt_data", - "target": "entity", - "selector": "this_entity", - "key": "cmd_my_cool_data", - "element": 45 -} -```