> For the complete documentation index, see [llms.txt](https://ajneb97.gitbook.io/playerkits-2/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ajneb97.gitbook.io/playerkits-2/items-tutorial.md).

# Items Tutorial

Almost all items on PlayerKits follow the same format, here you can find information of the properties of items. An example of an item config:

<pre class="language-yaml"><code class="lang-yaml">id: DIAMOND_SWORD
name: '&#x26;c&#x26;lDiamond &#x26;cKit'
amount: 1
lore:
- '&#x26;fThis kit includes:'
- '&#x26;8- &#x26;7x1 Diamond Axe'
- '&#x26;8- &#x26;7x1 Diamond Pickaxe'
<strong>- '&#x26;8- &#x26;7x1 Diamond Sword'
</strong>- ''
- '&#x26;7Cooldown: &#x26;c12 hours'
- '&#x26;7Price: &#x26;a$5000'
- ''
- '&#x26;aLeft Click to buy!'
- '&#x26;bRight Click to preview!'
item_flags:
- HIDE_ATTRIBUTES
</code></pre>

{% hint style="info" %}
Remember that you don't need to manually create each kit item. You can simply use /kit edit \<kit> and use a plugin like ItemEdit to do so. However, if you want to modify some of the properties of the item, this information will be helpful.
{% endhint %}

## Id

The id/material of the item.\
Latest Versions Material: <https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html>\
Legacy Materials: <https://helpch.at/docs/1.8/org/bukkit/Material.html>

```yaml
id: IRON_SWORD
```

## Durability

Durability or data value of the item.

```yaml
durability: 5
```

## Name

Custom name of the item.

* You can use any PlaceholderAPI variable. This will be static.

```yaml
name: "&cDiamond &c&lKit"
```

## Lore

Custom lore/description of the item.

* You can use any PlaceholderAPI variable. This will be static.

```yaml
lore:
- "&7Best sword on the server."
- ""
- "&7Owner: &6%player_name%"
```

## Amount

The number of items.

```yaml
amount: 16
```

## Custom Model Data

Custom model data value of the item. Only works on 1.16-1.21.3.

```yaml
custom_model_data: 5
```

## Custom Model Component Data

The new 1.21.4 custom model data. The flags, floats, colors and strings properties consist of a list of elements. More info here: <https://minecraft.wiki/w/Data_component_format/custom_model_data>

```yaml
custom_model_component_data:
  strings:
  - "string1"
  flags:
  - "flag1"
  - "flag2"
  floats: []
  colors: []
```

## Enchants

Enchantments of the item. Use the following format: `<name>;<level>`\
You can find all enchantment names here: <https://hub.spigotmc.org/javadocs/spigot/org/bukkit/enchantments/Enchantment.html>

```yaml
enchants:
- "DAMAGE_ALL;5"
```

## Item Flags

Item flags of this item. You can find all item flag names here: <https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/ItemFlag.html>

```yaml
item_flags:
- HIDE_ATTRIBUTES 
```

## Attributes

Attribute modifiers of this item. This is difficult to implement manually, so I suggest you not to modify this option unless you know what you are doing.\
Format: `<attribute_name>;<operation>;<value>;<uuid>;<slot>`\
Attribute names: <https://hub.spigotmc.org/javadocs/spigot/org/bukkit/attribute/Attribute.html>\
Operation names: <https://hub.spigotmc.org/javadocs/spigot/org/bukkit/attribute/AttributeModifier.Operation.html>\
Slot names: <https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/EquipmentSlot.html>\
Generate a random uuid here: <https://www.uuidgenerator.net/>

```yaml
attributes:
- GENERIC_MAX_HEALTH;ADD_SCALAR;0.1;1ab87334-7a32-4307-b783-c5519f735260;HAND
- GENERIC_MOVEMENT_SPEED;ADD_SCALAR;0.35;766d5332-e2b1-493d-af98-5d3046da3f0a;HAND
```

## Color

Color of a leather armor.

```yaml
color: 8439583
```

## Hide Tooltip <a href="#hide-tooltip" id="hide-tooltip"></a>

Whether the tooltip should be hidden or not. 1.20.6+

```yaml
hide_tooltip: true
```

## Tooltip Style <a href="#tooltip-style" id="tooltip-style"></a>

Style of the tooltip background for the item. 1.21.2+ \
More info here: <https://minecraft.wiki/w/Data_component_format#tooltip_style> \
Format: "\<namespace>:\<id>"

```yaml
tooltip_style: "custom:ajneb"
```

## Model

Model of the item. 1.21.4+\
More info here: <https://minecraft.wiki/w/Items_model_definition>\
Format: "\<namespace>:\<id>"

```yaml
model: "custom:model_1"
```

## Skull Data

Information of a player head with texture. You can find heads with textures and their properties here: <https://minecraft-heads.com/custom-heads>. You can also set the skull owner of the head, using the `%player%` variable to set the head texture as the player who is claiming the kit.

```yaml
skull_data:
    texture: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTA4Yjc3MmVjYWVlNzA2MjM1ZDFhZGJmMGI5YTI5YjU4YmE5YzBlZDYwZGU2ZjEwZWZiMWE3Zjg2ZDllIn19fQ=="
    id: "ec62ea75-402c-44fb-8f71-bef0015a4634"
```

```yaml
skull_data:
    owner: %player%
```

## Potion Data

Information of a potion item. Works for these items IDs: POTION, SPLASH\_POTIO&#x4E;*,* LINGERING\_POTION, TIPPED\_ARROW.\
Potion Types: <https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionType.html>\
Potion Effects: <https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html>

```yaml
potion_data:
    # Format for potion effects:
    # <potion_effect>;<level>;<duration_in_ticks>
    effects:
    - INCREASE_DAMAGE;1;4800
    - WATER_BREATHING;0;12000
    extended: false
    upgraded: false
    type: UNCRAFTABLE
    # Color only works on 1.9+, you can get the Minecraft color value here:
    # https://minecraftcommand.science/armor-color
    color: 6196631
```

## Banner Data

Information of a banner or shield item. Use the following format for patterns: `<color>;<type>`\
Colors: <https://hub.spigotmc.org/javadocs/spigot/org/bukkit/DyeColor.html>\
Pattern Types: <https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/banner/PatternType.html>

```yaml
banner_data:
    patterns:
    - BLUE;SQUARE_BOTTOM_LEFT
    - BLUE;SQUARE_TOP_RIGHT
    - LIME;STRAIGHT_CROSS
```

## Firework Data

Information of a firework rocket or a firework star. Format for firework effects:\
`<type>;<color1>,<color2>,...;<fade1>,<fade2>,...;<has flicker>;<has trail>`\
Firework types: <https://hub.spigotmc.org/javadocs/spigot/org/bukkit/FireworkEffect.Type.html>\
Colors: <https://minecraftcommand.science/armor-color>

```yaml
# For firework rocket item
firework_data:
    rocket_effects:
    - BALL_LARGE;11743532,2437522;1973019,15790320;false;true
    power: 1
```

```yaml
# For firework star item
firework_data:
    star_effect: BALL;16777215;14188952,4312372;false;false
```

## Book Data

Information of a written book. Pages are stored in JSON format so I suggest you not to modify this manually. Hover and click events are stored, but only on 1.12+.

```yaml
book_data:
    title: "Rules Book"
    generation: ORIGINAL
    author: "Ajneb97"
    pages: []
```

## Armor Trim Data

Information of armor trim smithing templates. Works only for armor items. Only works on 1.20+.\
Patterns: <https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/inventory/meta/trim/TrimPattern.html>\
Materials: <https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/inventory/meta/trim/TrimMaterial.html>

```yaml
trim_data:
    pattern: ward
    material: redstone
```

## NBT

NBT data of this item. This is difficult to implement manually, so I suggest you not to modify this option. (Only works on 1.8-1.20.4, nbt compounds don't exist anymore in Minecraft 1.20.5+)

```yaml
nbt:
- Unbreakable|true|boolean
```

## Other Kit Items Properties

Kit items can have additional properties.

### Offhand

Whether the item should be placed on the player's offhand when the kit es claimed (true/false).

```yaml
offhand: true
```

### Preview Slot

Custom slot to display the item in the kit preview inventory.

```yaml
preview_slot: 10
```
