> For the complete documentation index, see [llms.txt](https://tchat.tect.host/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tchat.tect.host/general/actions.md).

# Actions

Actions are configurable operations that can be attached to certain modules. When triggered, the plugin executes the configured actions in the order they are defined. Actions can perform various tasks such as sending messages, playing sounds, applying effects, executing commands, modifying player data, and more.

***

## Messaging

#### \[MESSAGE]

Sends a chat message to the player.

```yml
actions:
- "[MESSAGE] &aWelcome to the server!"
```

#### \[BROADCAST]

Sends a message to all online players.

```yaml
actions:
- "[BROADCAST] &6A special event has started!"
```

## Debug

#### \[DEBUG]

Writes a message to the console log. You can specify the log level.

```yaml
actions:
- "[DEBUG] INFO Player joined the server"
- "[DEBUG] WARN Invalid configuration detected"
- "[DEBUG] WARNING Invalid configuration detected"
- "[DEBUG] SEVERE Database connection failed"
- "[DEBUG] ERROR Database connection failed"
- "[DEBUG] FINE Processing message from player %player_name%"
- "[DEBUG] DEBUG Processing message from player %player_name%"
```

## Visual

#### \[TITLE]

Displays a title and optional subtitle on the player's screen.

Format: title;subtitle

```yaml
actions:
- "[TITLE] &aWelcome!;&7Enjoy your stay."
```

#### \[ACTION\_BAR]

Displays a message in the player's action bar.

```yaml
actions:
- "[ACTION_BAR] &eYou are in a safe zone."
```

## Commands

#### \[PLAYER\_COMMAND]

Executes a command as the player.

```yaml
actions:
- "[PLAYER_COMMAND] spawn"
- "[PLAYER_COMMAND] kit starter"
```

#### \[CONSOLE\_COMMAND]

Executes a command from the server console.

```yaml
actions:
- "[CONSOLE_COMMAND] give %player_name% diamond 1"
```

## World

#### \[SOUND]

Plays a Minecraft sound for the player.

```yaml
actions:
- "[SOUND] entity_player_levelup"
```

#### \[PARTICLE]

Spawns particles at the player's location.

```yaml
actions:
- "[PARTICLE] flame"
```

#### \[TELEPORT]

Teleports the player to a specific location.

Format: world;x;y;z

```yaml
actions:
- "[TELEPORT] world;100;64;200"
```

## Inventory

#### \[INVENTORY]

Modifies the player's inventory.

* ADD
  * Adds items to the player's inventory.
* REMOVE
  * Removes items from the player's inventory.
* CHANGE
  * Removes one item and gives another.

```yaml
actions:
- "[INVENTORY] ADD DIAMOND 5"
- "[INVENTORY] REMOVE DIAMOND 5"
- "[INVENTORY] CHANGE COAL 10 DIAMOND 1"
```

## Potion Effects

#### \[POTION\_EFFECT]

Adds or removes potion effects.

Format: TYPE:duration:amplifier

* ADD
  * Applies a potion effect.
* REMOVE
  * Removes a potion effect.

```yaml
actions:
- "[POTION_EFFECT] ADD SPEED:1200:1"
- "[POTION_EFFECT] ADD REGENERATION:200:2"
- "[POTION_EFFECT] REMOVE SPEED"
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://tchat.tect.host/general/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.
