-
Notifications
You must be signed in to change notification settings - Fork 19
ItemBuilder
Hakan Kargın edited this page Jun 1, 2022
·
1 revision
HItemBuilder class is a builder class for creating stack basicly. With this feature you can easily create and manage items.
HItemBuilder itemBuilder = new HItemBuilder(Material.DIAMOND_SWORD) // creates HItemBuilder with type Material.DIAMOND
.name("test") // changes name as "test"
.glow(true) // sets glow status as true
.addItemFlags(ItemFlag.HIDE_ENCHANTS) // adds item flag
.addEnchant(Enchantment.DAMAGE_ALL, 1); // adds Enchantment.DAMAGE_ALL with level 1
ItemStack item = itemBuilder.build(); // Creates item stack from builder.