> For the complete documentation index, see [llms.txt](https://edseries-plugins.gitbook.io/p/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edseries-plugins.gitbook.io/p/edcrates/getting-started/configuration.md).

# Configuration

Files, storage and the global limits in config.yml.

```
plugins/EdCrates/
  config.yml        storage, bulk limits, physical crate settings, rarity names
  messages.yml      every message
  guis/*.yml        every menu: the crate selector, previews, confirmation, and any you add
  animations.yml    animation presets (roulette, flicker, lootbox, lootbox-public)
  crates/*.yml      one file per crate
  data/             player data (yaml / sqlite) and placed crates
```

`/edcrates reload` reloads all of them. Placed crates are respawned with their new settings.

## Storage

```yaml
storage:
  type: yaml        # yaml | sqlite | mysql
  save-interval: 60 # seconds between background saves
  mysql:
    host: localhost
    port: 3306
    database: minecraft
    user: root
    password: ''
```

Data is loaded on join and saved on quit and on the interval, on a single background thread. Nothing touches the database on the main thread for an online player. Use MySQL on networks so keys follow the player between servers.

## Limits

| Key                              | Meaning                                                                                                   |
| -------------------------------- | --------------------------------------------------------------------------------------------------------- |
| `max-keys-per-open`              | The most keys one open spends; `0` (the default) means no limit.                                          |
| `max-command-repeats`            | Cap for `command-each`, the only action that runs once per roll.                                          |
| `max-items-per-reward`           | Cap on physical items one reward hands out per open.                                                      |
| `summary-lines` / `sort-summary` | Chat summary length and ordering.                                                                         |
| `draw-warn-threshold`            | Above this many draws the player gets a "rolling..." message first.                                       |
| `exact-roll-threshold`           | Draws below this are rolled one by one; at or above, counts are sampled per reward (instant at any size). |

## Rarities

`rarities:` maps a rarity id to its coloured text. Rewards reference an id with `rarity: legendary` and every lore, summary and announcement can use `{rarity}`.

## Colours

Every text accepts `&a` legacy codes, `&#RRGGBB` hex, and gradients: `<gradient:#F1C226:#FD6141>SEPTEMBER</gradient>`. Bold and underline inside a gradient are kept. PlaceholderAPI `%placeholders%` work in item names, lore, holograms and messages.
