# Configs

### Treasure configuration parameters:

{% code lineNumbers="true" %}

```yaml
treasure-name:
  chance: 10.0
  limit: 2
  random: true
  permission: "minetreasures.conditions-treasures"
  delivery: DROP]
  remove-vanilla-drops: true
```

{% endcode %}

***

### **`treasure-name:`**

Name of the treasure. Make sure it is unique, as treasures with identical names may cancel each other out.

***

### **`chance:`**

Defines the probability that the treasure will trigger, in percentage. Value between **0.001% and 100%**.\
The chance can be extremely low, going beyond **0.001%**.

**Example**:

{% code lineNumbers="true" %}

```yaml
chance: 10
# or
chance: 0.01
# or
chance: 10.0
```

{% endcode %}

***

### **`limit:`**

The maximum number of sections to be processed per treasure event. If the limit is not added, all treasures will attempt to execute.

**Example**:

{% code lineNumbers="true" %}

```yaml
limit: 2
```

{% endcode %}

***

### **`random:`**

Determines whether the selection of sections will be random.

**Example**:

{% code lineNumbers="true" %}

```yaml
random: true
```

{% endcode %}

***

### **`permission:`**

Permission required to access the treasure.

**Example**:

{% code lineNumbers="true" %}

```yaml
permission: "minetreasures.conditions-treasures"
```

{% endcode %}

***

### **`delivery:`**

How the reward will be delivered to the player

* **`DROP`**: On the ground, more objectively in the location where the block was broken;
* **`INVENTORY`**: In the player's inventory;
* **`STORED`**: It will be stored in a physical treasury that will be generated in the location that the block was broken;

If a delivery value is not added, the **drop-to-inventory: true** parameter from `config.yml` will be used.

**Example**:

{% code lineNumbers="true" %}

```yaml
delivery: STORED
```

{% endcode %}

***

### **`remove-vanilla-drops:`**

Defines whether the plugin will remove/cancel the block-breaking event after a treasure is triggered and the reward is given to the player.

The `remove-vanilla-drops` is a feature used to determine if the default Minecraft drops (known as "vanilla drops") should be **removed** when a block is broken. The plugin's behavior depends on the **first occurrence of `true`** in a reward with this setting, ignoring any subsequent values, even if they are `false`.

**Example**:

```yaml
remove-vanilla-drops: true
```
