> For the complete documentation index, see [llms.txt](https://obey.gitbook.io/wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://obey.gitbook.io/wiki/kits/features/kit-layouts.md).

# Custom Kit Layouts

Overview and configuration of the custom player kit layout editor in CrownKits.

CrownKits allows players to customize the exact inventory slots where kit items will be placed upon claiming a kit.

***

## How it Works

1. **Opening the Editor**:
   * Run `/kit layout <kitName>`
   * **Middle-Click** on any kit in the main `/kit` GUI.
   * Click the **Custom Layout** anvil button (slot 45) in the Kit Preview GUI.
2. **Inventory Layout Mapping**: The layout editor uses a standard 54-slot chest interface:
   * **Rows 1–3 (Slots 0–26)**: Map directly to the player's **Main Inventory** slots (slots 9–35).
   * **Row 4 (Slots 27–35)**: Maps directly to the player's **Hotbar** slots (slots 0–8).
   * **Row 5 (Slots 45–48)**: Dedicated **Armor Slots**:
     * Slot 45: Helmet
     * Slot 46: Chestplate / Elytra
     * Slot 47: Leggings
     * Slot 48: Boots
   * **Row 5 (Slot 50)**: Dedicated **Offhand Slot** (Shield, Totem of Undying, etc.).
   * **Slot 53**: **Reset Layout** button (Anvil icon) to restore default item arrangement.
3. **Auto-Saving**:
   * Layouts are automatically saved to the database as soon as the player closes the inventory.
   * If a player is holding an item on their cursor when closing, it is automatically returned into the layout.
4. **Slot Type Enforcement**:
   * Armor slots only accept corresponding armor types.
   * Personal player inventory items cannot be placed or swapped into the editor.

***

## Configuration Toggle

The layout system can be enabled or disabled globally in `config.yml`:

```yaml
# enables custom kit inventory layouts for players
enable-kit-layouts: true # set to false to disable
```

When set to `false`:

* The `/kit layout` command is disabled.
* Middle-clicking in the kit GUI is disabled, and layout prompts are filtered from GUI lores.
* The layout button in the preview GUI is hidden.
* Kits are always equipped using default item positions.
