# Reward Actions

Each reward has its own set of actions that are executed upon claiming the reward. \
\
The following pattern is valid for use: `[<action>] <statement>`\
\
These actions are listed here:

* **CONSOLE** - entered statement will be executed from console
* **PLAYER** - the statement will be executed as player command execution
* **MESSAGE** - messages the player with specified text
* **BROADCAST** - sends message to all online players
* **ACTIONBAR** - shows the text in actionbar for the player (<mark style="color:yellow;">only usable in 1.12+ versions</mark>)
* **BOSSBAR** - shows the text in bossbar for the player (<mark style="color:yellow;">only usable in 1.12+ versions</mark>)
* **TITLE** - sends primary title with entered text
* **SUBTITLE** - sends secondary title with entered text
* **SOUND** - plays specified sound for the player
* **FIREWORK** - launches a firework with stated properties above the player

{% hint style="info" %}
You can use the placeholder `%player%` which will be replaced by the player's name, %type% will be replaced by reward type, [random placeholders](/configuration/rewards/reward-features/randomization.md) and PlaceholderAPI placeholders
{% endhint %}

The following example is a demonstration of how to use actions in real .yml file of reward:

```yaml
actions:
    - '[console] give %player% diamond 1' # console will execute the give command for 1 diamond
    - '[console] give %player% iron_ingot %exampleRandom%' # console will execute the give command for random amount of iron ingots
    - '[console] give %player% gold_ingot 3' # console will execute give command for 3 gold ingots
    - '[console] say %player% claimed his %type% reward!' # console will execute say command with speciefied message
    - '[actionbar] &aSuccessfully claimed!' # '&aSuccessfully claimed' message will be shown in player's action bar
    - '[title] &aClaimed' # '&aClaimed' message will be print in a title for the player
    - '[subtitle] &aReward %type%' # '&aReward %type%' message will be print in a subtitle for the player
    - '[sound] BLOCK_CHEST_OPEN' # The sound of the chest opening will be played for the player
    - '[bossbar] &aClaimed %type% reward' # Stated text will appear in boss bar for the claimer
    - '[firework] colors:{FF0000;00FF00;0000FF},type:BALL_LARGE,power:2' # Launches firework with stated colors, type & power above the player
```


---

# 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://ultimaterewards.athelion.eu/configuration/rewards/reward-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.
