BlurpItem

BlurpItem is a builder-style utility class for creating and customizing ItemStack objects in plugins. It simplifies item creation.

Features

  • Builder pattern for fluent item creation

  • Set material, name, lore, enchantments, item flags, unbreakable state, and custom model data

  • Add a glow effect (even without enchantments)

  • Build a ready-to-use ItemStack

  • Create a BlurpItem from an existing ItemStack

Usage

Basic Example

ItemStack sword = new BlurpItem()
    .material(Material.DIAMOND_SWORD)
    .name("§bEpic Sword")
    .addLore("§7A sword of legends")
    .addEnchant(Enchantment.DAMAGE_ALL, 5)
    .unbreakable(true)
    .glow(true)
    .build();

From an Existing ItemStack

BlurpItem blurp = BlurpItem.from(existingItemStack);
blurp.name("§cRenamed!").build();

Setting Custom Model Data

ItemStack customItem = new BlurpItem()
    .material(Material.STICK)
    .customModelData(12345)
    .build();

API Reference

Method
Description

from(ItemStack)

Create a BlurpItem from an ItemStack

material(Material)

Set the item material

name(String)

Set the display name

addLore(String)

Add a line to the lore

addEnchant(Enchantment, int)

Add an enchantment

flags(ItemFlag...)

Add item flags

unbreakable(boolean)

Set unbreakable state

customModelData(int)

Set custom model data

glow(boolean)

Add a glow effect (visual only)

build()

Build and return the ItemStack

Notes

  • The glow(true) method adds a fake enchantment and hides it for a glowing effect.

  • If you want to add multiple lore lines, call addLore() multiple times.

Last updated