# Commands

#### List of reward commands:

{% code lineNumbers="true" %}

```yaml
commands:       
# Run command by Console
- "[CONSOLE] give %player_name% stone 1"

# Run command by Player
- "[PLAYER] &9I'm a nice guy, everyone."

# Messages
- "[MESSAGE] &6[Treasure] &7- &7You have found another &aEffect Command&7 treasure!"
- "[RANGE_MESSAGE] 50 &7Someone received a treasure near you!"
- "[BROADCAST] &8A global event has started!"

# Sounds
- "[SOUND] ENTITY_PLAYER_LEVELUP 1.0 1.0"
- "[WORLD_SOUND] ENTITY_PLAYER_LEVELUP 2.0 0.8"
- "[EVENT_SOUND] ENTITY_PLAYER_LEVELUP 1.0 1.5"
- "[WORLD_EVENT_SOUND] ENTITY_PLAYER_LEVELUP 1.5 1.0"

# Title
- "[TITLE] 10 60 20 T:&9Treasure Found! S:&bYou found a command!"
- "[BROADCAST_TITLE] 10 60 20 T:&9Treasure Found! S:&bYou found a command!"

# ActionsBar
- "[ACTIONBAR] &eYou have found another magical treasure!"
- "[BROADCAST_ACTIONBAR] &a%player_name%&b is a nice guy!"

# Effects
- "[EFFECT] CLEAR"
- "[EFFECT] SET speed 60 2"
- "[EFFECT] REMOVE speed"
- "[EFFECT] ADD speed 60 2"

```

{% endcode %}

***

## \[CONSOLE]

Executes a command as console.

* `[CONSOLE] command`
  * **command**: The command to be executed.

**Example**:

{% code lineNumbers="true" %}

```yaml
- "[CONSOLE] give %player_name% stone 1"
```

{% endcode %}

***

## \[PLAYER]

Executes a command as a player.

* `[PLAYER] command`
  * **command**: The command to be executed by the player.

**Example**:

{% code lineNumbers="true" %}

```yaml
- "[PLAYER] &9I'm a nice guy, everyone."
```

{% endcode %}

***

## \[MESSAGE]

Sends a message to the player.

* `[MESSAGE] text`
  * **text**: The message to be sent.

**Example**:

{% code lineNumbers="true" %}

```yaml
- "[MESSAGE] &9You found a treasure!"
```

{% endcode %}

***

## \[RANGE\_MESSAGE]

Sends a message to all players within a specific distance (in blocks).

* `[RANGE_MESSAGE] distance text`
  * **distance**: Distance in blocks.
  * **text**: The message to be sent.

**Example**:

{% code lineNumbers="true" %}

```yaml
- "[RANGE_MESSAGE] 50 &7Someone received a treasure near you!"
```

{% endcode %}

***

## \[BROADCAST]

Sends a message to all players.

* `[BROADCAST] text`
  * **text**: The message to be sent.

**Example**:

{% code lineNumbers="true" %}

```yaml
- "[BROADCAST] &8A global event has started!"
```

{% endcode %}

***

## \[SOUND]

Sends a sound to the player.

* `[SOUND] sound volume pitch`
  * **sound**: Sound name.
  * **volume**: Sound volume.
  * **pitch**: Sound pitch.

**Example**:

{% code lineNumbers="true" %}

```yaml
- "[SOUND] ENTITY_PLAYER_LEVELUP 1.0 1.0"
```

{% endcode %}

***

## \[WORLD\_SOUND]

Sends a sound to all players in the world.

* `[WORLD_SOUND] sound volume pitch`
  * **sound**: Sound name.
  * **volume**: Sound volume.
  * **pitch**: Sound pitch.

**Example**:

{% code lineNumbers="true" %}

```yaml
- "[WORLD_SOUND] ENTITY_PLAYER_LEVELUP 2.0 0.8"
```

{% endcode %}

***

## \[EVENT\_SOUND]

Sends a sound at the event location to the player.

* `[EVENT_SOUND] sound volume pitch`
  * **sound**: Sound name.
  * **volume**: Sound volume.
  * **pitch**: Sound pitch.

**Example**:

{% code lineNumbers="true" %}

```yaml
- "[EVENT_SOUND] ENTITY_PLAYER_LEVELUP 1.0 1.5"
```

{% endcode %}

***

## \[WORLD\_EVENT\_SOUND]

Sends a sound at the event location to all players.

* `[WORLD_EVENT_SOUND] sound volume pitch`
  * **sound**: Sound name.
  * **volume**: Sound volume.
  * **pitch**: Sound pitch.

**Example**:

{% code lineNumbers="true" %}

```yaml
- "[WORLD_EVENT_SOUND] ENTITY_PLAYER_LEVELUP 1.5 1.0"
```

{% endcode %}

***

## \[TITLE]

Sends a title to the player.

* `[TITLE] fadeInTicks stayTicks fadeOutTicks T:title S:subtitle`
  * **fadeInTicks**: Duration of fade-in in ticks.
  * **fadeOutTicks**: Duration of fade-out in ticks.
  * **T:title**: Main text.
  * **S:subtitle**: Subtitle text.

**Example**:

{% code lineNumbers="true" %}

```yaml
- "[TITLE] 10 60 20 T:&9Treasure Found! S:&bYou found a command!"
```

{% endcode %}

***

## \[BROADCAST\_TITLE]

Sends a title to all players.

* `[BROADCAST_TITLE] fadeInTicks stayTicks fadeOutTicks T:title S:subtitle`
  * **fadeInTicks**: Duration of fade-in in ticks.
  * **fadeOutTicks**: Duration of fade-out in ticks.
  * **T:title**: Main text.
  * **S:subtitle**: Subtitle text.

**Example**:

{% code lineNumbers="true" %}

```yaml
- "[BROADCAST_TITLE] 10 60 20 T:&9Treasure Found! S:&bYou found a command!"
```

{% endcode %}

***

## **\[ACTIONBAR]**

Executes a command as console.

* `[ACTIONBAR] message`
  * **message**: The command to be executed.

**Example**:

{% code lineNumbers="true" %}

```yaml
- "[ACTIONBAR] Be careful %player_name%! An enemy is nearby."
```

{% endcode %}

***

## **\[BROADCAST\_ACTIONBAR]**

Executes a command as console.

* `[BROADCAST_ACTIONBAR] message`
  * **message**: The command to be executed.

**Example**:

{% code lineNumbers="true" %}

```yaml
- "[BROADCAST_ACTIONBAR] &a%player_name%&b is a nice guy!"
```

{% endcode %}

***

## **\[EFFECT]**

Adds, removes, or clears potion effects.

* **CLEAR**
  * Clears the player's potion effects.
  * `[EFFECT] CLEAR`
* **ADD**
  * Adds a new potion effect to the player.
  * `[EFFECT] ADD type duration level`
    * **type**: Effect type.
    * **duration**: Effect duration in ticks.
    * **level**: Effect level.
* **SET**
  * Clears and sets a new potion effect for the player.
  * `[EFFECT] SET type duration level`
    * **type**: Effect type.
    * **duration**: Effect duration in ticks.
    * **level**: Effect level.
* **REMOVE**
  * Removes a specific potion effect from the player.
  * `[EFFECT] REMOVE type`
    * **type**: Effect type.

**Example**:

{% code lineNumbers="true" %}

```yaml
- "[EFFECT] CLEAR"
- "[EFFECT] ADD speed 60 2"
- "[EFFECT] SET speed 60 2"
- "[EFFECT] REMOVE speed"
```

{% endcode %}


---

# 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://pretti.gitbook.io/prtminetreasures/treasures/rewards/commands.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.
