# Actions

This section is used for dialogues and actions. You can use PlaceholderAPI variables on actions.

<table data-header-hidden><thead><tr><th>Action</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td>Action</td><td>Description</td><td>Example</td></tr><tr><td><strong>console_command</strong></td><td>Executes a command from the console.</td><td><code>console_command: eco give %player% 5000</code></td></tr><tr><td><strong>player_command</strong></td><td>Executes a command from the player.</td><td><code>player_command: warp survival</code></td></tr><tr><td><strong>player_command_as_op</strong></td><td>Executes a command from the player as OP. (Not recommended)</td><td><code>player_command_as_op: help</code></td></tr><tr><td><strong>teleport</strong></td><td>Teleports the player. Use this format: <br>"teleport: world;x;y;z;yaw;pitch"</td><td><code>teleport: lobby;0;60;0;90;0</code></td></tr><tr><td><strong>give_potion_effect</strong></td><td>Gives a potion effect to the player. Use this format: <br>"give_potion_effect: effect;duration_in_ticks;level;particles"<br>You can find a list of potion effects here: <a href="https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html">https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html</a></td><td><code>give_potion_effect: BLINDNESS;180;1;false</code></td></tr><tr><td><strong>remove_potion_effect</strong></td><td>Removes a potion effect from the player.</td><td><code>remove_potion_effect: BLINDNESS</code></td></tr><tr><td><strong>playsound</strong></td><td>Plays a sound to the player. Use this format:<br>"playsound: sound;volume;pitch"<br>You can find a list of sounds here: <a href="https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html">https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html</a><br>Use this list instead when using 1.8: <a href="https://helpch.at/docs/1.8.8/index.html?org/bukkit/Sound.html">https://helpch.at/docs/1.8.8/index.html?org/bukkit/Sound.html</a></td><td><code>playsound: BLOCK_NOTE_BLOCK_PLING;10;0.1</code></td></tr><tr><td><strong>playsound_resource_pack</strong></td><td>Plays a resource pack sound to the player. Uses the same format of the playsound action.</td><td><p><code>playsound_resource_pack:</code></p><p><code>my_custom_sound;10;1</code></p></td></tr><tr><td><strong>stopsound</strong></td><td>Stops a sound for the player.<br><br>Use <code>stopsound: &#x3C;sound></code> for specific sound. Only works on 1.10+. <br><br>Use <code>stopsound: all</code> for stopping all sounds. Only works on 1.17+.</td><td><p></p><p><code>stopsound: BLOCK_NOTE_BLOCK_PLING</code><br><code>stopsound: all</code></p></td></tr><tr><td><strong>stopsound_resource_pack</strong></td><td>Stops a resource pack sound for the player.</td><td><code>stopsound_resource_pack: scorpions:custom.test</code></td></tr><tr><td><strong>title</strong></td><td>Sends a title and subtitle message to the player. Use this format: <br>"title: fadeIn;stay;fadeOut;title;subtitle" fadeIn, stay and fadeOut must be in ticks, 20ticks = 1second <br>If you want just a title, or just subtitle write "none"</td><td><code>title: 20;40;20;&#x26;6This is a title;none</code></td></tr><tr><td><strong>actionbar</strong></td><td>Sends an actionbar message to the player. Use this format: <br>"actionbar: message;duration" (The duration must be in ticks, 20ticks = 1second)</td><td><code>actionbar: &#x26;6Starting conversation...;60</code></td></tr><tr><td><strong>remove_item</strong></td><td>Removes X amount of items from the player inventory. You can check the format <a href="#remove-item"><strong>HERE</strong></a>.</td><td><code>remove_item: DIAMOND;10</code></td></tr><tr><td><strong>firework</strong></td><td>Spawns a firework from the player location. You can check the format <a href="#undefined"><strong>HERE</strong></a>.</td><td><code>firework: colors:YELLOW,RED type:BALL fade:AQUA power:0</code></td></tr><tr><td><strong>wait</strong></td><td>Waits X amount of seconds before executing more actions.</td><td><code>wait: 2</code></td></tr><tr><td><strong>wait_ticks</strong></td><td>Waits X amount of ticks before executing more actions. (20ticks = 1 second)</td><td><code>wait_ticks: 10</code></td></tr><tr><td><strong>influence</strong></td><td>Sets, adds or removes influence from the current conversation entity for the player.</td><td><code>influence: set;5</code><br><code>influence: add;2</code><br><code>influence: remove;2</code></td></tr><tr><td><strong>send_to_server</strong></td><td>Sends the player to a bungee server.</td><td><pre><code><strong>send_to_server: lobby
</strong></code></pre></td></tr></tbody></table>

### Remove Item

This is the format for the **remove\_item** action:\
`remove_item: <type>;<amount>;datavalue: <datavalue>;name: <name>;lorecontains: <lore_line>`

{% hint style="warning" %}
Datavalue, name and lorecontains attributes are OPTIONAL. Don't use color formatting.
{% endhint %}

{% hint style="info" %}
You can find a list of valid types of items here:\
For latest versions:\
<https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html>\
For 1.8:\
<https://helpch.at/docs/1.8/org/bukkit/Material.html>
{% endhint %}

You can also use the CheckItem expansion of PlaceholderAPI (<https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Placeholders#checkitem>) to remove items, following this format:\
`remove_item: %checkitem_remove_,,<...>%`

{% tabs %}
{% tab title="Example 1" %}

```yaml
# This will remove x5 Diamonds from the player inventory.
remove_item: DIAMOND;5
```

{% endtab %}

{% tab title="Example 2" %}

```yaml
# This will remove x5 Diamonds named 'Unique Diamond' 
# from the player inventory.
remove_item: "DIAMOND;5;name: Unique Diamond"
```

{% endtab %}

{% tab title="Example 3" %}

```yaml
# This will remove x1 Coal Block named "Burst Turret"
# from the player inventory.
remove_item: "%checkitem_remove_mat:COAL_BLOCK,nameequals:&aBurst &6Turret,amt:1%"
```

{% endtab %}
{% endtabs %}

### Firework

This is the format for the **firework** action:\
`firework: colors:<color1>,<color2> type:<type> fade:<color1>,<color2> power:<power>`

{% hint style="warning" %}
The fade property is optional, the rest are necessary. You can add more than 2 colors.
{% endhint %}

{% hint style="info" %}
Firework Colors: <https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Color.html>\
Firework Types: <https://hub.spigotmc.org/javadocs/spigot/org/bukkit/FireworkEffect.Type.html>
{% endhint %}

{% tabs %}
{% tab title="Example 1" %}

```yaml
firework: colors:YELLOW,RED type:BALL fade:AQUA power:0
```

{% endtab %}

{% tab title="Example 2" %}

```yaml
firework: colors:BLACK,WHITE type:BURST power:1
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ajneb97.gitbook.io/interactions/actions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
