# donutsmp crates

The DonutSMP crate system is a standalone pick-your-reward system — players choose items, confirm, consume a virtual key currency. It is managed by LethiumCrates but is separate from the reroll/spin/animation features.

## Setup

Create a new crate using the create command, and then set its location.\
You can then add items to it using the additem command.

1. `/donutcrate create <name>`
2. `/donutcrate setlocation <crate>`
3. `/donutcrate additem <crate>` (While holding the item you want to add)

## Keys & Storage

Keys are stored persistently using LethiumCrates's built in database connection.\
You can give or take keys from players. You can also give keys to all online players.

1. `/donutcrate give <currency> <player> <amount>` - Use to give currency
2. `/donutcrate key give <keytype> <player> <amount>` - Use to give keys. The key type corresponds to the key-type of the crate being opened

## Config Format

Each crate has its own config file inside `plugins/LethiumCrates/DonutCrates/crates/`

An example config looks like this:

```yaml
size: 27
key-type: amethyst
title: "á´„Êœá´á´sá´‡ 1 Éªá´›á´‡á´"
filler:
  slots:
  - 0
  - 1
  - 2
  - 3
  - 4
  - 5
  - 6
  - 7
  - 8
  - 9
  - 16
  - 17
  - 18
  - 19
  - 20
  - 21
  - 22
  - 23
  - 24
  - 25
  - 26
  material: BLACK_STAINED_GLASS_PANE
  display-name: '&#6E3AADá´€á´á´‡á´›ÊœÊêœ±á´› á´„Ê€á´€á´›á´‡'
  lore:
  - '&#A8A8A8With a á´€á´á´‡á´›ÊœÊêœ±á´› á´‹á´‡Ê you can choose'
```

... and so on.


---

# 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://lethium-store.gitbook.io/lethiumcrates/features/donutsmp-crates.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.
