> 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/configuration.md).

# Configuration

Default config.yml and kits.yml documentation for CrownKits.

## Default config.yml

```yaml
#
# Thank you for purchasing CrownKits!
# If you have any questions, suggestions or need help, please do not hesitate and
# join our discord: https://dsc.gg/crownplugins to ask for help!
# We are there to assist you.
#

# you can obtain your license in our discord! https://dsc.gg/crownplugins
# paste your license key in here
license: paste-here

# enable this to send various messages to console
debug-mode: false

storage:
  method: h2 # you can choose between h2 and mysql and mariadb
  data:
    host: crownhost
    database: crowndatabase
    username: crownuser
    password: "crownpassword"

    # sets the maximum size of the MySQL connection pool.
    #   https://github.com/brettwooldridge/HikariCP/wiki/About-Pool-Sizing
    pool-settings:
      maximum-pool-size: 10
      minimum-idle: 10
      maximum-lifetime: 1800000
      keepalive-time: 0
      connection-timeout: 5000

# lets you disable the kit command if not wanted
enable-kit-command: true

# enables custom kit inventory layouts for players
enable-kit-layouts: true

cooldown-format: "%mm%m %ss%s"

# set to AIR to disable, this material will be used in the gui on kits that are on cooldown for the player
on-cooldown-material: BARRIER
# this can be a skull texture, paste everything after 'eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUv'
# the skull might be a little buggy when shown in the inventory because of it updating to often
on-cooldown-texture: none

# enable/disable the feature that allows players to buy a kit off cooldown for ingame money
# the price can be set per second of cooldown for each kit.
purchasable-kits: true

# this is the material for the kit vouchers
voucher-material: PAPER

# delay after joining until the kit is given in ticks
first-join-kit-delay: 100
# the kit that is given on firstjoin
first-join-kit: none

# the kit players will get when they respawn
# set to random to let the plugin randomly choose a kit
respawn-kit: none

# settings for the kit gui
fill-material: IRON_BARS
fill-slots:
  - 0
  - 9
  - 18
  - 27
  - 36
  - 45
  - 8
  - 17
  - 26
  - 35
  - 44
  - 53

gui-size: 54

# settings for the back button in the preview gui
# action: MENU (opens default CrownKits menu) or COMMAND (executes command for the player)
back-button:
  action: MENU
  command: "menu"

item-overflow-behaviour: GUI # you can choose between DROP, REMOVE, GUI and SHULKER

# settings for shulker overflow behaviour
shulker:
  material: SHULKER_BOX
  name: "<!italic>%displayname% <white><bold>Kit</bold></white>"
```

***

## Configuration Options

### `license`

Your plugin license key. Obtain your license key in the [CrownPlugins Discord](https://dsc.gg/crownplugins).

### `debug-mode`

* Values: `true` / `false`
* When enabled, detailed debug logs will be output to the server console. Can also be toggled with `/kit debug`.

### `storage`

* `method`: The database backend to store player cooldowns, custom layouts, and player settings. Choose between `h2`, `mysql`, or `mariadb`.
* `data`: Database connection credentials (`host`, `database`, `username`, `password`).
* `pool-settings`: HikariCP connection pool settings (`maximum-pool-size`, `minimum-idle`, `maximum-lifetime`, `keepalive-time`, `connection-timeout`).

### `enable-kit-command`

* Values: `true` / `false`
* Toggle whether the primary `/kit` command is enabled on your server.

### `enable-kit-layouts`

* Values: `true` / `false`
* Globally enables or disables the custom kit layout system. When disabled, the layout editor, layout commands, GUI middle-click prompts, and custom layout equipping are completely disabled.

### `cooldown-format`

* Formatting pattern used for cooldown timers in GUI lores and messages.
* Example: `"%mm%m %ss%s"` or `"%hh%h %mm%m %ss%s"`.

### `on-cooldown-material` & `on-cooldown-texture`

* `on-cooldown-material`: Material displayed in the kit GUI when a kit is on cooldown for the player (e.g., `BARRIER`). Set to `AIR` to disable.
* `on-cooldown-texture`: Custom player skull texture hash for the cooldown item. Set to `none` if using a standard material.

### `purchasable-kits`

* Values: `true` / `false`
* Allows players to buy kits off-cooldown using in-game currency via Vault (Shift-Right-Click in the GUI). Each kit defines its price per second in `kits.yml`.

### `voucher-material`

* Material used when generating physical kit redeem vouchers (defaults to `PAPER`).

### `first-join-kit` & `first-join-kit-delay`

* `first-join-kit`: Name of the kit automatically granted when a player joins the server for the first time. Set to `none` to disable.
* `first-join-kit-delay`: Delay in server ticks (20 ticks = 1 second) before granting the first-join kit.

### `respawn-kit`

* Name of the kit given to players upon respawn. Set to `none` to disable, or `random` to randomly select one of the configured kits. Players can toggle this setting with `/kit togglerespawn`.

### `fill-material`, `fill-slots`, & `gui-size`

* `fill-material`: Bukkit material used as background filler in the main kit selection GUI (e.g., `IRON_BARS`, `GRAY_STAINED_GLASS_PANE`).
* `fill-slots`: List of inventory slot numbers to fill with the filler item.
* `gui-size`: Total size of the main kit GUI in slots (must be a multiple of 9, e.g. `54`).

### `back-button`

Defines what happens when a player clicks the Back button in the kit preview GUI. Especially useful for servers using third-party GUI plugins (such as DeluxeMenus):

* `action`:
  * `MENU`: Opens the default CrownKits kit selection menu.
  * `COMMAND`: Executes a configured command for the player.
* `command`: The command to execute when `action` is set to `COMMAND` (supports `%player%` and PlaceholderAPI placeholders; can be specified with or without leading `/`). E.g. `"menu"` or `"dm open kits"`.

### `item-overflow-behaviour`

Controls what happens when a player claims a kit and their inventory does not have enough empty slots for all kit items:

* `DROP`: Drops overflowing items onto the ground at the player's location.
* `GUI`: Opens a temporary 54-slot inventory containing the remaining items.
* `REMOVE`: Discards any overflowing items that do not fit.
* `SHULKER`: Packages all overflowing items into a Shulker Box and gives it to the player.

### `shulker`

* `material`: Material of the overflow shulker box (e.g., `SHULKER_BOX`, `PURPLE_SHULKER_BOX`).
* `name`: Display name of the shulker box with MiniMessage styling (e.g., `"<!italic>%displayname% <white><bold>Kit</bold></white>"`).

***

## kits.yml Structure

Kits are stored in `kits.yml` (and can be modified in-game using `/kit` commands):

```yaml
kits:
  warrior:
    permission: crownkits.warrior
    texture: none
    displayname: "<red><bold>Warrior</bold></red>"
    showItem:
      ==: org.bukkit.inventory.ItemStack
      v: 3955
      type: DIAMOND_SWORD
    slot: 11
    pricePerSecond: 0.5
    category: none
    cooldowns:
      default: 3600000
      crownkits-vip: 1800000
    items:
      - ==: org.bukkit.inventory.ItemStack
        v: 3955
        type: DIAMOND_SWORD
```
