Advanced Item Creation

This guide will walk you through creating highly customized items using the plugin's configuration files. This system allows you to define every aspect of an item in YAML, from its name and lore to custom skins and hidden data, without touching any Java code.

All items are defined within an item section, which you can place in files like boosters.yml or a dedicated items.yml.

The Basic Structure

At a minimum, every item needs a material, a name, and lore.

YAML

basic_stone:
  material: "STONE"
  name: "&aSimple Stone"
  lore:
    - "&7This is the first line."
    - "&7This is the second."

Common Item Properties

Beyond the basics, you can add many other properties to customize your items.

  • amount: Sets the stack size of the item.

  • glow: (true/false) Adds an enchantment glint without a visible enchant.

  • unbreakable: (true/false) Makes tools and armor have infinite durability.

  • custom-model-data: A number used by resource packs to give the item a custom texture.

  • enchantments: A list of enchantments to apply. The format is "ENCHANTMENT_NAME:LEVEL".

  • flags: A list of ItemFlags to hide parts of the item's default tooltip, like enchantments or attributes. Common flags include HIDE_ENCHANTS, HIDE_ATTRIBUTES, and HIDE_UNBREAKABLE.

Example with Common Properties:

YAML


Advanced Customization: Skulls & NBT

Here is where the system becomes truly powerful, allowing you to create unique items with custom skins and hidden data.

Creating Custom Player Heads (Skulls)

To create a custom head, you must set the material to PLAYER_HEAD. You can then define its skin in one of two ways.

1. By Player Name (skull-owner)

This is the easiest method. It uses the skin of an existing Minecraft player.

YAML

2. By Texture Value (texture)

This is a more advanced and permanent method. It uses a Base64 texture value that you can get from websites like mineskin.orgarrow-up-right. The advantage is that the skin will never change, even if the original player changes their skin.

YAML

Adding Custom NBT Data

NBT (Named Binary Tag) is hidden data stored on an item. It is the best way to identify your custom items because players cannot see or change it. This prevents players from simply renaming a normal item to cheat the system.

You can add NBT data under the nbt section using the format "key: 'type:value'".

Supported Types: string, int (or integer), double, boolean (or bool), and long.

Example with NBT:

This creates a "key" item that your plugin can later identify in a listener by checking for the door_id and is_master_key tags.

YAML

Last updated