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

# 动作(Actions)

这一节是执行的动作

| 动作                            | 描述                                                                                                                                                                                            | 例子                                                                                       |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| **console\_command**          | 从控制台执行命令                                                                                                                                                                                      | `console_command: eco give %player% 5000`                                                |
| **player\_command**           | 从玩家执行命令                                                                                                                                                                                       | `player_command: warp survival`                                                          |
| **player\_command\_as\_op**   | 以OP权限为玩家执行命令                                                                                                                                                                                  | `player_command_as_op: help`                                                             |
| **teleport**                  | 传送玩家，请使用以下格式: "teleport: 世界;x;y;z;yaw;pitch"                                                                                                                                                  | `teleport: lobby;0;60;0;90;0`                                                            |
| **give\_potion\_effect**      | 给玩家一个药水效果，请使用以下格式: "give\_potion\_effect: 效果;持续刻数;等级" 你可以在这找到所有效果: <https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html>                                         | `give_potion_effect: BLINDNESS;180;1`                                                    |
| **remove\_potion\_effect**    | 移除一种药水效果                                                                                                                                                                                      | `remove_potion_effect: BLINDNESS`                                                        |
| **playsound**                 | 为玩家播放一种声音. 请使用以下格式: "playsound: 声音;音量;音高" 你可以在这找到所有声音: <https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html> 1.8的: <https://helpch.at/docs/1.8.8/index.html?org/bukkit/Sound.html> | `playsound: BLOCK_NOTE_BLOCK_PLING;10;0.1`                                               |
| **playsound\_resource\_pack** | 播放材质包音效                                                                                                                                                                                       | <p><code>playsound\_resource\_pack:</code></p><p><code>my\_custom\_sound;10;1</code></p> |
| **title**                     | 发送一段标题. 请使用以下格式: "title: 淡入时间;停留时间;淡出时间;标题;副标题" 时间按刻计算, 20刻 = 1秒 如果不想要标题或者副标题用none替代                                                                                                          | `title: 20;40;20;&6This is a title;none`                                                 |
| **firework**                  | 在玩家所处方位放一个烟花，格式看底下                                                                                                                                                                            | `firework: colors:YELLOW,RED type:BALL fade:AQUA power:0`                                |
| **remove\_item**              | 移除玩家背包里X个物品. 你可以在下一节查看格式.                                                                                                                                                                     | `remove_item: DIAMOND;10`                                                                |

## 移除物品(Remove Item)

格式：`remove_item: <种类>;<数量>;datavalue: <数据值>;name: <名称>;lorecontains: <包含的描述>`

{% hint style="warning" %}
数据值，名称，包含的描述都为可选项，不要使用颜色代码
{% endhint %}

{% hint style="info" %}
你可以在下面找到所有物品列表

最新版本：<https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html>

1.8：<https://helpch.at/docs/1.8/org/bukkit/Material.html>
{% endhint %}

{% tabs %}
{% tab title="例子1" %}

```
# 这将移除五个钻石
remove_item: DIAMOND;5
```

{% endtab %}

{% tab title="例子2" %}

```
# 这将移除五个叫Unique Diamond的钻石
remove_item: "DIAMOND;5;name: Unique Diamond"
```

{% endtab %}

{% tab title="例子3" %}

```
# 这会从玩家背包移除一个叫做"Burst Turret"的煤块
remove_item: "%checkitem_remove_mat:COAL_BLOCK,nameequals:&aBurst &6Turret%,amt:1"
```

{% endtab %}
{% endtabs %}

你也可以用PlceholderAPI中的checkitem来删除物品，请用下方格式：

`remove_item: %checkitem_remove_,,<...>%`

详情请见<https://www.mcbbs.net/thread-1226244-1-1.html>

## 烟花(Firework)

格式:

`firework: colors:<颜色1>,<颜色2> type:<种类> fade:<颜色1>,<颜色2> power:<能量>`

{% hint style="warning" %}
`fade(渐变)选项是可选的，但是其他的必须要填，你可以加2种以上的颜色`
{% endhint %}

{% hint style="info" %}
烟花颜色: <https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Color.html>\
烟花种类: <https://hub.spigotmc.org/javadocs/spigot/org/bukkit/FireworkEffect.Type.html>
{% endhint %}
