# 💎Treasures

The **Treasures Module** allows server owners to configure loot rewards within mines. Players can receive treasures based on configurable probabilities, with optional daily limits to prevent excessive farming.

Admins can reset a player's daily limits using `/prisontreasures reset <player>`.

#### Global Configuration

The global settings define treasures that apply across all mines.

```
Global:
  Treasures:
    1:
      Chance: 0.99
      Daily: true
      Daily Limit: 10
      Commands:
        - "give <player> diamond 1"
```

* `Chance`: Probability of obtaining this treasure.
* `Daily`: Whether the loot has a daily limit. Resets midnight at local time.
* `Daily Limit`: The maximum number of times this treasure can be obtained per day.
* `Commands`: List of commands executed when a player finds the treasure.

#### Per-Mine Configuration

Each mine can have its own treasure settings.

```
Mines:
  Basic:
    Treasures:
      Diamonds:
        Chance: 100.0
        Daily: true
        Daily Limit: 100
        Commands:
          - "give <player> diamond 1"
```

* `Chance`: The probability of obtaining this treasure in the specific mine.
* `Daily`: Whether the loot has a daily restriction. Resets midnight at local time.
* `Daily Limit`: Maximum times a player can receive the treasure per day.
* `Commands`: The commands executed when a player receives the treasure.

#### Conclusion

The **Treasures Module** provides a structured way to reward players with items while ensuring balanced gameplay. By configuring drop rates and daily limits, you can prevent over-farming while keeping mining engaging for players.
