Skip to main content
The ItemCreator class provides a powerful and intuitive API for building customized ItemStack objects. It uses a fluent builder pattern for easy chaining of modifications.

Creating items

Basic creation

ItemStack item = ItemCreator.of(CompMaterial.DIAMOND_SWORD)
    .name("&6Legendary Sword")
    .lore("&7A powerful weapon")
    .make();

From existing ItemStack

ItemStack existing = player.getInventory().getItemInMainHand();
ItemStack modified = ItemCreator.of(existing)
    .name("&aRenamed Item")
    .lore("&7Additional lore line")
    .make();

Static factory methods

of(CompMaterial material)
ItemCreator
Create a new ItemCreator from a material.
ItemCreator creator = ItemCreator.of(CompMaterial.DIAMOND);
of(CompMaterial material, String name, String... lore)
ItemCreator
Create an ItemCreator with material, name, and lore. Automatically hides tags.
ItemCreator creator = ItemCreator.of(
    CompMaterial.DIAMOND_SWORD,
    "&6Epic Sword",
    "&7Damage: +10",
    "&7Speed: +5"
);
of(ItemStack item)
ItemCreator
Create an ItemCreator from an existing ItemStack.
ItemStack existing = new ItemStack(Material.STONE);
ItemCreator creator = ItemCreator.of(existing);
ofWool(CompColor color)
ItemCreator
Create a colored wool item.
ItemStack redWool = ItemCreator.ofWool(CompColor.RED).make();
ofEgg(EntityType entityType)
ItemCreator
Create a spawn egg for the specified entity type.
ItemStack creeperEgg = ItemCreator.ofEgg(EntityType.CREEPER)
    .name("&aCreeper Egg")
    .make();
ofPotion(PotionEffectType potionEffect)
ItemCreator
Create a potion with the specified effect.
ItemStack speedPotion = ItemCreator.ofPotion(PotionEffectType.SPEED)
    .name("&bSpeed Potion")
    .make();

Builder methods

Basic properties

material(CompMaterial material)
ItemCreator
Set the material of the item.
ItemCreator.of(CompMaterial.STONE)
    .material(CompMaterial.DIAMOND)
    .make();
amount(int amount)
ItemCreator
Set the stack size.
ItemCreator.of(CompMaterial.ARROW)
    .amount(64)
    .make();
damage(int damage)
ItemCreator
Set the damage/durability of the item.
ItemCreator.of(CompMaterial.DIAMOND_PICKAXE)
    .damage(100)
    .make();
name(String name)
ItemCreator
Set the display name. Color codes with & are automatically replaced.
ItemCreator.of(CompMaterial.DIAMOND)
    .name("&b&lRare Diamond")
    .make();

Lore

lore(String... lore)
ItemCreator
Add lore lines. Color codes are replaced automatically.
ItemCreator.of(CompMaterial.SWORD)
    .lore("&7Damage: 10")
    .lore("&7Durability: 100")
    .lore("") // Empty line
    .lore("&eRare weapon")
    .make();
lore(List<String> lore)
ItemCreator
Add multiple lore lines from a list.
List<String> loreLines = Arrays.asList(
    "&7Line 1",
    "&7Line 2"
);
ItemCreator.of(CompMaterial.BOOK)
    .lore(loreLines)
    .make();
clearLore()
ItemCreator
Remove all existing lore.
ItemCreator.of(existingItem)
    .clearLore()
    .lore("&7New lore")
    .make();

Enchantments

enchant(Enchantment enchantment)
ItemCreator
Add an enchantment at level 1.
ItemCreator.of(CompMaterial.DIAMOND_SWORD)
    .enchant(CompEnchantment.SHARPNESS)
    .make();
enchant(Enchantment enchantment, int level)
ItemCreator
Add an enchantment at a specific level.
ItemCreator.of(CompMaterial.DIAMOND_SWORD)
    .enchant(CompEnchantment.SHARPNESS, 5)
    .enchant(CompEnchantment.FIRE_ASPECT, 2)
    .make();

Visual effects

glow(boolean glow)
ItemCreator
Make the item glow (adds hidden enchantment).
ItemCreator.of(CompMaterial.NETHER_STAR)
    .name("&6Special Item")
    .glow(true)
    .make();
color(CompColor color)
ItemCreator
Set the color for leather armor or colorable blocks.
ItemCreator.of(CompMaterial.LEATHER_CHESTPLATE)
    .color(CompColor.RED)
    .make();
modelData(int modelData)
ItemCreator
Set custom model data (MC 1.14+).
ItemCreator.of(CompMaterial.STICK)
    .name("&6Magic Wand")
    .modelData(1001)
    .make();

Item flags

flags(CompItemFlag... flags)
ItemCreator
Add item flags to hide certain properties.
ItemCreator.of(CompMaterial.DIAMOND_SWORD)
    .enchant(CompEnchantment.SHARPNESS, 1)
    .flags(CompItemFlag.HIDE_ENCHANTS)
    .make();
hideTags(boolean hideTags)
ItemCreator
Hide all tags (enchantments, attributes, etc.).
ItemCreator.of(CompMaterial.DIAMOND_SWORD)
    .enchant(CompEnchantment.SHARPNESS, 5)
    .hideTags(true)
    .make();
unbreakable(boolean unbreakable)
ItemCreator
Make the item unbreakable.
ItemCreator.of(CompMaterial.DIAMOND_PICKAXE)
    .unbreakable(true)
    .make();

Skull customization

skullOwner(String skullOwner)
ItemCreator
Set the skull owner by player name.
ItemCreator.of(CompMaterial.PLAYER_HEAD)
    .skullOwner("Notch")
    .name("&6Notch's Head")
    .make();
skullUrl(String skullUrl)
ItemCreator
Set the skull texture from a URL or base64 string.
ItemCreator.of(CompMaterial.PLAYER_HEAD)
    .skullUrl("http://textures.minecraft.net/texture/...")
    .name("&6Custom Head")
    .make();

NBT tags

tag(String key, String value)
ItemCreator
Add a custom NBT tag to the item.
ItemCreator.of(CompMaterial.DIAMOND)
    .name("&6Rare Diamond")
    .tag("rarity", "legendary")
    .tag("item_id", "diamond_rare_001")
    .make();
Retrieve tags later using CompMetadata.getMetadata(item, key)

Book customization

bookPages(String... pages)
ItemCreator
Set the pages of a book.
ItemCreator.of(CompMaterial.WRITTEN_BOOK)
    .bookTitle("&6Tutorial")
    .bookAuthor("Admin")
    .bookPages(
        "&6Chapter 1\n\n&7Welcome to the server!",
        "&6Chapter 2\n\n&7Here are the rules..."
    )
    .make();
bookAuthor(String bookAuthor)
ItemCreator
Set the author of a book.
bookTitle(String bookTitle)
ItemCreator
Set the title of a book.

Building items

make()
ItemStack
Construct the final ItemStack with all specified properties.
ItemStack item = ItemCreator.of(CompMaterial.DIAMOND_SWORD)
    .name("&6Sword")
    .make();
makeMenuTool()
ItemStack
Create an item suitable for menus (all tags hidden, unbreakable).
ItemStack menuItem = ItemCreator.of(CompMaterial.COMPASS)
    .name("&6Navigation")
    .makeMenuTool();

Convenience methods

give(Player player)
void
Add this item directly to a player’s inventory.
ItemCreator.of(CompMaterial.DIAMOND)
    .name("&6Reward")
    .give(player);
drop(Location location)
void
Drop this item at a specific location.
ItemCreator.of(CompMaterial.GOLD_INGOT)
    .amount(10)
    .drop(player.getLocation());

Advanced examples

Creating a menu tool

ItemStack menuItem = ItemCreator.of(CompMaterial.CHEST)
    .name("&6Storage")
    .lore(
        "",
        "&7Click to open your storage",
        "&7Capacity: 54 slots"
    )
    .glow(true)
    .makeMenuTool();

Custom skull with NBT

ItemStack customHead = ItemCreator.of(CompMaterial.PLAYER_HEAD)
    .skullUrl("http://textures.minecraft.net/texture/abc123...")
    .name("&6Custom NPC")
    .lore(
        "&7Type: Quest Giver",
        "&7Level: 50"
    )
    .tag("npc_id", "quest_giver_001")
    .tag("npc_level", "50")
    .makeMenuTool();

Enchanted tool with custom model

ItemStack magicWand = ItemCreator.of(CompMaterial.STICK)
    .name("&5&lMagic Wand")
    .lore(
        "",
        "&7Spell Power: 100",
        "&7Mana Cost: 20",
        "",
        "&eRare Item"
    )
    .enchant(CompEnchantment.UNBREAKING, 3)
    .modelData(5001)
    .glow(true)
    .unbreakable(true)
    .tag("item_type", "wand")
    .tag("spell_power", "100")
    .make();

Colored leather armor

ItemStack redArmor = ItemCreator.of(CompMaterial.LEATHER_CHESTPLATE)
    .name("&cFire Armor")
    .color(CompColor.RED)
    .enchant(CompEnchantment.PROTECTION, 4)
    .enchant(CompEnchantment.FIRE_PROTECTION, 4)
    .unbreakable(true)
    .hideTags(true)
    .make();

Reward item with glow

ItemStack reward = ItemCreator.of(CompMaterial.NETHER_STAR)
    .name("&6&lDaily Reward")
    .lore(
        "",
        "&7Right-click to claim:",
        "&7• 1000 coins",
        "&7• 10 experience",
        "&7• Random item"
    )
    .glow(true)
    .tag("reward_id", "daily_001")
    .tag("expires", String.valueOf(System.currentTimeMillis() + 86400000))
    .make();

Static configuration

setLorePrefix(String prefix)
void
Set the default prefix added to all lore lines. Default is “&7”.
ItemCreator.setLorePrefix("&f"); // White lore instead of gray
getLorePrefix()
String
Get the current lore prefix.

Build docs developers (and LLMs) love