# Kits

<figure><img src="https://3650476264-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfAyz09ASs8veyxsflZ9y%2Fuploads%2F2Wygh8V46WBhknBCtg4x%2Fkits.gif?alt=media&#x26;token=59991515-b2fb-4f5e-ac31-55464b290277" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3650476264-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfAyz09ASs8veyxsflZ9y%2Fuploads%2Fzw4GJ3YSfC9yBLJpYhbD%2Fcooldown-delete.gif?alt=media&#x26;token=fbd0467d-1e6f-4b09-a4e0-98e7248e9cb2" alt=""><figcaption></figcaption></figure>

## Configuration

### `name`

Sets the name of the kit.

```yaml
name: fight
```

### `display-name`

Allows you to define the name of the kit that will be displayed in messages.

```yaml
display-name: "Fight"
```

### `cooldown`

Set the default cooldown of the kit, in seconds.

```yaml
cooldown: 86400
```

### `permission-cooldowns`

Allows to set the list of permissions and cooldowns, the smallest cooldown will be used.

```yaml
permission-cooldowns:
  - permission: 'essentials.kits.fight.vip'
    cooldown: 82800
  - permission: 'essentials.kits.fight.admin'
    cooldown: 3600
```

### `permission`

Allows you to define the permission of the kit, by default the permission will be: `essentials.kit.<kit name>`

```yaml
permission: essentials.kit.builder
```

### `items`

Allows you to define the list of items used by the kit. You must use [zMenu](https://docs.zmenu.dev/configurations/items) documentation for item items.

```yaml
items:
  item-1:
    material: GRASS_BLOCK
    amount: 64
    name: builder
```

{% hint style="info" %}
If you want to define items coming from another plugin, you must use a `console command` **action** to give the item to your player. You can also convert the item to **base64** with the command `/zm save`
{% endhint %}

### `actions`

Allows you to define a list of actions that will be performed when the player receives the kit. You must go to the [zmenu](https://docs.zmenu.dev/configurations/actions) docs for actions.

```yaml
actions:
  - type: console command
    commands:
      - 'effect give %player% minecraft:speed 60'
```

### `helmet`

Allows to define the item that will have on the player’s helmet, if the player already has an equipped item he will receive the item.

```yaml
helmet:
  material: DIAMOND_HELMET
  enchants:
    - protection,1
```

### `chestplate`

Allows to define the item that will have on the player’s chestplate, if the player already has an equipped item he will receive the item.

```yaml
chestplate:
  material: IRON_CHESTPLATE
  enchants:
    - protection,3
```

### `leggings`

Allows to define the item that will have on the player’s leggings, if the player already has an equipped item he will receive the item.

```yaml
leggings:
  material: IRON_LEGGINGS
  enchants:
    - protection,3
```

### `boots`

Allows to define the item that will have on the player’s boots, if the player already has an equipped item he will receive the item.

```yaml
boots:
  material: DIAMOND_BOOTS
  enchants:
    - protection,1
```

## Files

### Config.yml

```yaml
########################################################################################################################
#
# ██╗░░██╗██╗████████╗░██████╗
# ██║░██╔╝██║╚══██╔══╝██╔════╝
# █████═╝░██║░░░██║░░░╚█████╗░
# ██╔═██╗░██║░░░██║░░░░╚═══██╗
# ██║░╚██╗██║░░░██║░░░██████╔╝
# ╚═╝░░╚═╝╚═╝░░░╚═╝░░░╚═════╝░
#
# Documentation: https://zessentials.groupez.dev/modules/kits
#
########################################################################################################################

enable: true

# Change the display of the kits
#
# IN_LINE: Displays a message with the list of kits on the same line
# INVENTORY: Displays the kits in an inventory
# MULTI_LINE: Displays a message with a header and footer (optional) and a message per kits
display: IN_LINE

# Gives kits when the player joins the server for the first time
kits-on-first-join:
  - "tools"
```

### Kits.yml

```yaml
name: "#3f3f3fᴋɪᴛs"
size: 27
items:
  tools:
    slot: 11
    type: ZESSENTIALS_KIT_COOLDOWN
    kit: "tools"
    update: true
    refreshOnClick: true
    item:
      material: IRON_PICKAXE
      name: '&fᴋɪᴛ&8: #c1c1c3ɪʀᴏɴ ᴛᴏᴏʟs'
      lore:
        - ''
        - '#ffd353ℹ Informations#3f3f3f:'
        - '#3f3f3f• &7Cooldown#3f3f3f: #4cd5ff%cooldown%'
        - ''
        - '&f➥ <st>&nLeft Click&r&7 to get the kit'
        - '&f➦ &nRight Click&r&7 to view the contents'
    else:
      type: ZESSENTIALS_KIT_GET
      kit: "tools"
      closeInventory: true
      item:
        material: IRON_PICKAXE
        name: '&fᴋɪᴛ&8: #c1c1c3ɪʀᴏɴ ᴛᴏᴏʟs'
        lore:
          - ''
          - '#ffd353ℹ Informations#3f3f3f:'
          - '#3f3f3f• &7Cooldown#3f3f3f: #43ff15Available !'
          - ''
          - '&f➥ &nLeft Click&r&7 to get the kit'
          - '&f➦ &nRight Click&r&7 to view the contents'
      else:
        item:
          material: IRON_PICKAXE
          name: '&fᴋɪᴛ&8: #c1c1c3ɪʀᴏɴ ᴛᴏᴏʟs'
          lore:
            - ''
            - '#ffd353ℹ Informations#3f3f3f:'
            - "#3f3f3f• #ff0000You don't have permission"
            - ''
            - '&f➥ <st>&nLeft Click&r&7 to get the kit'
            - '&f➦ &nRight Click&r&7 to view the contents'

  food:
    slot: 13
    type: ZESSENTIALS_KIT_COOLDOWN
    kit: "food"
    update: true
    refreshOnClick: true
    item:
      material: COOKED_BEEF
      name: '&fᴋɪᴛ&8: #c1c1c3ғᴏᴏᴅ'
      lore:
        - ''
        - '#ffd353ℹ Informations#3f3f3f:'
        - '#3f3f3f• &7Cooldown#3f3f3f: #4cd5ff%cooldown%'
        - ''
        - '&f➥ <st>&nLeft Click&r&7 to get the kit'
        - '&f➦ &nRight Click&r&7 to view the contents'
    else:
      type: ZESSENTIALS_KIT_GET
      kit: "food"
      closeInventory: true
      item:
        material: COOKED_BEEF
        name: '&fᴋɪᴛ&8: #c1c1c3ғᴏᴏᴅ'
        lore:
          - ''
          - '#ffd353ℹ Informations#3f3f3f:'
          - '#3f3f3f• &7Cooldown#3f3f3f: #43ff15Available !'
          - ''
          - '&f➥ &nLeft Click&r&7 to get the kit'
          - '&f➦ &nRight Click&r&7 to view the contents'
      else:
        item:
          material: COOKED_BEEF
          name: '&fᴋɪᴛ&8: #c1c1c3ғᴏᴏᴅ'
          lore:
            - ''
            - '#ffd353ℹ Informations#3f3f3f:'
            - "#3f3f3f• #ff0000You don't have permission"
            - ''
            - '&f➥ <st>&nLeft Click&r&7 to get the kit'
            - '&f➦ &nRight Click&r&7 to view the contents'

  fight:
    slot: 15
    type: ZESSENTIALS_KIT_COOLDOWN
    kit: "fight"
    update: true
    refreshOnClick: true
    item:
      material: DIAMOND_SWORD
      name: '&fᴋɪᴛ&8: #c1c1c3ғɪɢʜᴛ'
      lore:
        - ''
        - '#ffd353ℹ Informations#3f3f3f:'
        - '#3f3f3f• &7Cooldown#3f3f3f: #4cd5ff%cooldown%'
        - ''
        - '&f➥ &nLeft Click&r&7 to get the kit'
        - '&f➦ &nRight Click&r&7 to view the contents'
    else:
      type: ZESSENTIALS_KIT_GET
      kit: "fight"
      closeInventory: true
      item:
        material: DIAMOND_SWORD
        name: '&fᴋɪᴛ&8: #c1c1c3ғɪɢʜᴛ'
        lore:
          - ''
          - '#ffd353ℹ Informations#3f3f3f:'
          - '#3f3f3f• &7Cooldown#3f3f3f: #43ff15Available !'
          - ''
          - '&f➥ &nLeft Click&r&7 to get the kit'
          - '&f➦ &nRight Click&r&7 to view the contents'
      else:
        item:
          material: DIAMOND_SWORD
          name: '&fᴋɪᴛ&8: #c1c1c3ғɪɢʜᴛ'
          lore:
            - ''
            - '#ffd353ℹ Informations#3f3f3f:'
            - "#3f3f3f• #ff0000You don't have permission"
            - ''
            - '&f➥ <st>&nLeft Click&r&7 to get the kit'
            - '&f➦ &nRight Click&r&7 to view the contents'
```

### Kit Preview\.yml

```yaml
name: "#3f3f3fᴋɪᴛs"
size: 54
items:
  items:
    type: ZESSENTIALS_KIT_PREVIEW
    slots:
      - 0-44
  back:
    type: INVENTORY
    plugin: zEssentials
    inventory: "kit_preview"
    item:
      material: BARRIER
      name: '&f➥ &nClick&r&7 to go back'
```

### figth.yml

```yaml
name: fight
display-name: "Fight"

cooldown: 86400

permission-cooldowns:
  - permission: 'essentials.kits.fight.vip'
    cooldown: 82800
  - permission: 'essentials.kits.fight.admin'
    cooldown: 3600

items:
  sword:
    material: DIAMOND_SWORD
    enchants:
      - sharpness,2
  apple:
    material: GOLDEN_APPLE
    amount: 4
  carrot:
    material: GOLDEN_CARROT
    amount: 16

helmet:
  material: DIAMOND_HELMET
  enchants:
    - protection,1
chestplate:
  material: IRON_CHESTPLATE
  enchants:
    - protection,3
leggings:
  material: IRON_LEGGINGS
  enchants:
    - protection,3
boots:
  material: DIAMOND_BOOTS
  enchants:
    - protection,1

actions:
  - type: console command
    commands:
      - 'effect give %player% minecraft:speed 60'
```

### food.yml

```yaml
name: food
cooldown: 3600
items:
  beef:
    material: COOKED_BEEF
    amount: 16
```

### tools.yml

```yaml
name: tools
cooldown: 7200
items:
  iron_sword:
    material: IRON_SWORD
  iron_pickaxe:
    material: IRON_PICKAXE
  iron_axe:
    material: IRON_AXE
  iron_shovel:
    material: IRON_SHOVEL
  iron_hoe:
    material: IRON_HOE
```
