# Actions

Actions are used on certain cases while in the game, also to give rewards.

## Message <a href="#message" id="message"></a>

Sends a message to the player.

```yaml
message: &6➤ &f&l%piece% &8[&f%coords%&8] &aselected!

# Only if use_minimessage option is enabled in the config
message: <gold>➤ <white><bold>%piece% <dark_gray>[<white>%coords%<dark_gray>] <green>selected!
```

## Centered Message <a href="#centered-message" id="centered-message"></a>

Sends a centered message to the player.

```yaml
centered_message: &e&lTIME IS UP!

# Only if use_minimessage option is enabled in the config
centered_message: <yellow><b>TIME IS UP!
```

{% hint style="warning" %}
When <kbd>use\_minimessage</kbd> is enabled in the config:

This action only supports color MiniMessages tags. (You can't use other tags like \<hover> or \<click>, if you want to do so, use the `message` action and center the text manually)
{% endhint %}

## Console Command <a href="#console-command" id="console-command"></a>

Executes a command from the console.

```yaml
console_command: eco give %player_winner% 100
```

## Player Command <a href="#player-command" id="player-command"></a>

Executes a command from the player.

```yaml
player_command: menu
```

## Play Sound <a href="#play-sound" id="play-sound"></a>

Plays a sound to the player. Use this format: `"playsound: sound;volume;pitch` \
You can find a list of sounds here: <https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html>

```yaml
playsound: BLOCK_PISTON_EXTEND;10;1.5
```

## Title <a href="#title" id="title"></a>

Sends a title and subtitle message to the player. Use this format: `"title: fadeIn;stay;fadeOut;title;subtitle"` (The duration of fadeIn, stay and fadeOut must be in ticks, 20ticks = 1second) \
If you want just a title, or just subtitle write "none"

```yaml
title: 10;80;10;&e&lTIME IS UP!;&eIt's a tie!
```


---

# 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/minechess/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.
