Pages: Item builder

Item builder

ItemBuilder lets you build an ItemStack without all the usual boilerplate.

val item = ItemBuilder(Material.DIAMOND_SWORD)
    .setName("Legendary Sword".gold())
    .setLore("A sword of great power", "Right click to use")
    .addEnchant(Enchantment.SHARPNESS, 5, true)
    .setGlow(true)
    .build()

You can also start from an existing item with ItemBuilder.of(item) if you just want to tweak it a bit.