# Configuration

The plugin uses three main configuration files: `config.yml` , `droptables.yml` and `rewards.yml`.

### config.yml

This file contains basic plugin  customizable messages. Example configuration:

```yaml
settings:
  message:
    reward_received: "&aYou have received rewards for your position #%position%!" # Message sent to the player when he receives the rewards
    inventory_full: "&eSome rewards have been dropped on the ground because your inventory is full." # Message sent to the player when his inventory is full
```

You can modify these messages to match your server's style. Use '&' for color codes.

### droptables.yml

Droptables are collections of rewards that can be randomly selected and given to players. Think of them as loot bags or treasure chests that contain multiple possible rewards, where only some of them will be given each time. Here's how to configure it:

```yaml
CommonLoot: #Table Name
  maxRewards: 3  # Up to how many rewards can be given, in this example: Up to 3 rewards
  rewards:
    - IRON_SWORD 1 0.7 2  # Format: Item/Command Amount Probability TimesAllowed
    - GOLDEN_APPLE 1-3 0.5 1
    - EXPERIENCE_BOTTLE 5-10 1.0 3
    - nexo:CustomItem 1-3 0.2 1
    - cmd:{money give %player% 1000} 1 0.4 1 
```

* **Table Name**: Each droptable starts with a unique name (like `CommonLoot` in the example)
* **maxRewards**: The maximum number of different rewards that will be given from this table (The actual number might be less depending on probabilities)
* **Rewards List**: Each reward follows this format:
  * `ITEM/COMMAND AMOUNT PROBABILITY TIMES_ALLOWED`

### rewards.yml

This file defines the rewards for each boss. Here's how to configure it:

#### Basic Structure:

```yaml
BossName:
  Rewards:
    1:  # First place rewards
      - reward_entry
    2:  # Second place rewards
      - reward_entry
    3:  # Third place rewards
      - reward_entry
    4-10: # Fourth to tenth place rewards
      - reward_entry
```

#### Reward entry types

#### a) Vanilla Minecraft Items:

```yaml
- DIAMOND_SWORD 1 1.0 # Example with a diamond sword with 100% chance to give
```

Format: `MATERIAL QUANTITY PROBABILITY`

* MATERIAL: Minecraft material name (e.g., DIAMOND\_SWORD, GOLDEN\_APPLE)
* QUANTITY: Either a fixed number (1) or a range (1-5)
* PROBABILITY: Number between 0.0 and 1.0 (1.0 = 100% chance)

#### b) MythicMobs Items:

```yaml
- KingsCrown 1 0.5 # Example with default MythicMobs item KingsCrown
```

Format: `MYTHIC_ITEM_ID QUANTITY PROBABILITY`

* MYTHIC\_ITEM\_ID: The ID of your MythicMobs item
* Other parameters work the same as vanilla items

c) Nexo Items:

```yaml
- nexo:YourCustomItem 1-2 0.2 # Example with nexo item named YourCustomItem
```

Format: `nexo:NEXO_ITEM_ID QUANTITY PROBABILITY`

* NEXO\_ITEM\_ID: The ID of your Nexo item
* Other parameters work the same as vanilla items

#### d) Console Commands:

```yaml
- cmd:{money give %player_name% 1000} 1 1.0 # Example that gives the player in position 1,000 currency, 1 time, with a 100% probability
```

Format: `cmd:{COMMAND} QUANTITY PROBABILITY`

* COMMAND: The command to execute (supports PlaceholderAPI)
* QUANTITY: How many times the command will be executed, either a fixed number (1) or a range (1-5)
* PROBABILITY: Chance of command execution

e) DropTables:

```yaml
- table:CommonLoot # Reference to a droptable named CommonLoot
```

Format: `table:DropTableName`

* DropTableName: The table declared on droptables.yml file

### Complete Example:

```yaml
SkeletonKing: # Boss name
  Rewards:
    1:  # Position of the player in the ranking
      - NETHERITE_INGOT 1-2 0.5 # ID of the material, quantity, probability
      - DIAMOND 3-5 1.0
      - KingsCrown 1 1.0 # MythicMobs item, quantity, probability
      - cmd:{money give %player_name% 1000} 1 1.0 # Command from console, probability
    2:
      - table:CommonLoot # Reference to a droptable named CommonLoot
      - DIAMOND 2-4 1.0
      - DRAGON_BREATH 1 0.3
    3-10: # Multi-Top support
      - IRON_INGOT 3-5 1.0
      - EXPERIENCE_BOTTLE 15-20 1.0
    # Only positions declared will be rewarded
```

### Configuration Tips

* Boss names are case-insensitive but must match your MythicMobs boss IDs
* You can define rewards for as many positions as needed
* Players in positions without defined rewards won't receive anything
* Use ranges (e.g., 1-5) for varying quantities
* Lower probabilities (e.g., 0.5) make rewards rarer
* Test your configuration with common items before using valuable ones


---

# 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://elplatano0871.gitbook.io/elplatano0871-plugins/damagerewards/configuration.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.
