# Actions

Actions can be used as rewards when unlocking discoveries. More info [**HERE**](https://ajneb97.gitbook.io/codex/categories-tutorial#rewards).

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

Sends a message to the player.

```yaml
message: #eeeeee&lCODEX UPDATED &7Monsters: %name%

# Only if use_minimessage option is enabled in the config
message: <#eeeeee><bold>CODEX UPDATED
```

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

Sends a centered message to the player.

```yaml
centered_message: &7Check it now by using #eeeeee/codex

# Only if use_minimessage option is enabled in the config
centered_message: <gray>Check it now by using <#eeeeee>/codex
```

{% 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% 5000
```

## 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_NOTE_BLOCK_PLING;1;0.1
```

## Title

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: 20;60;20;#eeeeee&lCODEX UPDATED;&7Monster: %name%

# Only if use_minimessage option is enabled in the config
title: 20;60;20;<#eeeeee><bold>CODEX UPDATED;<gray>World History: %name%
```
