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

# 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
```

## Play Sound Resource Pack

Plays a resource pack sound to the player. The format is the same as `playsound` action.

```yaml
playsound_resource_pack: scorpions:custom.my_custom_sound;10;1
```

## 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!
```
