# Rewards

### Basic Reward Structure

```yaml
reward:
  reward_type: MONEY
  amount: 250
```

Every reward **must** define a `reward_type`.\
Additional fields depend on the selected reward type.

***

### Available Reward Types

#### Standard Reward Types

**`COMMAND`**

Executes one or multiple commands **from the console** when the quest is completed.

```yaml
reward:
  reward_type: COMMAND
  commands:
    - "eco give %player% 250"
```

**Notes**

* Commands are executed as **console**, not as the player.
* Multiple commands are supported.
* Supported placeholders:
  * `%player%`
  * `%required%`
  * `%questName%`

***

**`EXP_POINTS`**

Gives **experience points** to the player.

```yaml
reward:
  reward_type: EXP_POINTS
  amount: 500
```

***

**`EXP_LEVELS`**

Gives **experience levels** to the player.

```yaml
reward:
  reward_type: EXP_LEVELS
  amount: 3
```

***

**`MONEY`**

Gives money to the player using **Vault-compatible economy plugins**.

```yaml
reward:
  reward_type: MONEY
  amount: 250
```

**Requirements**

* Vault installed
* Any Vault-compatible economy plugin

***

**`POINTS`**

Gives points to the player using supported points plugins.

```yaml
reward:
  reward_type: POINTS
  amount: 100
```

**Supported plugins**

* PlayerPoints
* TokenManager

***

### Plugin-Specific Reward Types

#### `COINS_ENGINE`

Gives coins using the **CoinsEngine** plugin.

```yaml
reward:
  reward_type: COINS_ENGINE
  currency_label: "quests_coins"
  currency_display_name: "&6&lQuests Coins"
  amount: 500
```

**Parameters**

| Key                     | Description                                                                      |
| ----------------------- | -------------------------------------------------------------------------------- |
| `currency_label`        | Name of the currency file (without `.yml`) located in `CoinsEngine/currencies/`. |
| `currency_display_name` | Display name used in the reward message sent to the player.                      |
| `amount`                | Amount of coins given.                                                           |

***

### Dynamic Reward Amount

The `amount` parameter can be defined as a **range** instead of a fixed value.

```yaml
amount: 100-300
```

When the quest is assigned:

* A random value within the range is selected
* The value is **locked per player**
* The reward amount does **not change** afterward

***

#### Example

```yaml
reward:
  reward_type: MONEY
  amount: 100-300
```

Full quest example:

```yaml
1:
  name: "&aStone Collector"
  menu_item: STONE
  description:
    - "&bMine %required% stone blocks."
    - "&bReward: &c$%reward_amount%&b."
  quest_type: BREAK
  required: STONE
  required_amount: 10-50
  reward:
    reward_type: MONEY
    amount: 100-300
```

#### Explanation

* Required blocks: random value between **10 and 50**
* Reward money: random value between **$100 and $300**
* Both values are generated once per player and stay fixed

***

#### Notes

* Ranges must be written as `min-max`
* Both values must be positive numbers
* Works with **all reward types using a numeric `amount`**

***

### Tips & Best Practices

* Use **dynamic rewards** to reduce quest farming and improve replayability
* Prefer `COMMAND` rewards for custom plugin integrations
* Always ensure external plugins (Vault, CoinsEngine, etc.) are installed before using related reward types

***

### Need More Reward Types?

Want support for another plugin or reward system?\
➡️ **Make a suggestion on our Discord** — integrations are added based on community feedback.
