# Reward

{% hint style="warning" %}
Please, keep on mind, that reward is **NOT** only one item in the game. It is a **collection** of commands and items, which will be given to player at claiming.
{% endhint %}

## What does reward consist of? <a href="#what-does-reward-consist-of" id="what-does-reward-consist-of"></a>

* `Key` - **Unique** name of the reward. It is used at assigment to the specific day.
* `Name` - Real, **human readable**, name of the reward. Visible after claiming at opened window.
* `Description` - Optional. Visible only for staff at Reward Repository for better orientation.
* `Icon` - Item representing reward. For example, **Diamond Pickaxe**.
* `Items` - **Collection** of items given to player at claiming the reward.
* `Commands` - **Collection** of commands executed to player at claiming the reward.

## How to create reward <a href="#how-to-create-reward" id="how-to-create-reward"></a>

There are two options how to create reward. By in-game **Reward UI** or **Manually** in the confiuration file. Both have some restrictions, so if you want use some advanced methods you will need to use combination of them.

### **Using in-game Reward UI**

{% hint style="info" %}
To open **Reward UI** type `/Easter Settings`
{% endhint %}

You can inspire with EggHunt tutorial and its first 5 minutes.

{% embed url="<https://www.youtube.com/watch?v=YSCtwGplwdk>" %}

### **Manually in the file**

Configuration file `RewardRepository.yml` is located at folder `Reward`.

#### **Template for the one reward**

```yaml
UniqueRewardKey:
  Name: '&5Name of the reward using color codes!'
  Description: 'Optional Description'
  Icon:
    Material: STONE #Material of the Icon
    MaterialData: 0 #Used for items, where the plugin runs on the version from 1.8.8 to 1.12.X. Here you can specify color of the material.
    Enchantment: false #Flag if the enchantment is applied on the Icon
    Color: "255:255:255" #RGB Color format of leather armor
    ItemFlags: #Flags applied on the Icon
    - HIDE_ENCHANTS
    - HIDE_ATTRIBUTES
    CustomModelData: 0 # Only versions 1.14 and above
  Reward:
    ItemList: [] #Cannot be set upped here.
    CommandList: []
```

#### List of commands example

```yaml
CommandList:
- "money give {player} 100"
- "set VIP {player} 30Day"
```

### Testing the reward

At **detail** of the Reward, at **bottom** of the UI, there is a `Redstone Dust`. By click on it, you can **test** the reward. All Items and Commands will be given to you. (No Database query/update will be executed.)

{% hint style="info" %}
Available through **Settings** and **Reward Repository**.
{% endhint %}

## Finally

After successful setting up of the rewards, you need to reload the plugin to load new rewards.

{% hint style="info" %}
To reload the whole plugin type `/Easter Reload`
{% endhint %}


---

# 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://wiki.innouniq.com/plugins/archieve/easter-season-2023-2024/configuration/reward.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.
