Class ItemBuilder
java.lang.Object
net.headmonitor.MonitorLibPaper.builders.ItemBuilder
- Direct Known Subclasses:
SkullBuilder
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddEnchantment(org.bukkit.enchantments.Enchantment enchantment) Add an Enchantment to the ItemStack.addEnchantment(org.bukkit.enchantments.Enchantment enchantment, int level) Add an Enchantment to the ItemStack.addItemFlag(org.bukkit.inventory.ItemFlag itemFlag) Add an ItemFlag to the ItemStack.addItemFlags(org.bukkit.inventory.ItemFlag... itemFlag) Add ItemFlags to the ItemStack.org.bukkit.inventory.ItemStackcreate()Create the ItemStack.lore(Collection<String> lore) Set the Lore of the ItemStack from a String Collection.Set the Lore of the ItemStack from a Component Text List.material(org.bukkit.Material material) Set the Material of the ItemStack.Set the Name of the ItemStack from a String.name(net.kyori.adventure.text.Component name) Set the Name of the ItemStack from a Component Text.setEnchantments(Map<org.bukkit.enchantments.Enchantment, Integer> enchantments) Set Enchantments to the ItemStack from a Map.
-
Field Details
-
material
protected org.bukkit.Material material -
name
protected net.kyori.adventure.text.Component name -
lore
-
enchantments
-
itemFlags
-
-
Constructor Details
-
ItemBuilder
public ItemBuilder()
-
-
Method Details
-
material
Set the Material of the ItemStack.- Parameters:
material- The Material to set.
-
name
Set the Name of the ItemStack from a Component Text.- Parameters:
name- The Name Component.
-
name
Set the Name of the ItemStack from a String. The String will be converted to a Component with White Color and no Italics.- Parameters:
name- The Name String.
-
lore
Set the Lore of the ItemStack from a Component Text List.- Parameters:
lore- The Lore Component List.
-
lore
Set the Lore of the ItemStack from a String Collection.- Parameters:
lore- The Lore String Collection.
-
setEnchantments
Set Enchantments to the ItemStack from a Map.- Parameters:
enchantments- The Enchantments Map.
-
addEnchantment
Add an Enchantment to the ItemStack.- Parameters:
enchantment- The Enchantment to add.level- The Enchantment Level to add.
-
addEnchantment
Add an Enchantment to the ItemStack. Level will be set to 1.- Parameters:
enchantment- The Enchantment to add.
-
addItemFlags
Add ItemFlags to the ItemStack.- Parameters:
itemFlag- The ItemFlags to add.
-
addItemFlag
Add an ItemFlag to the ItemStack.- Parameters:
itemFlag- The ItemFlag to add.
-
create
public org.bukkit.inventory.ItemStack create()Create the ItemStack.
-