Class ItemBuilder

java.lang.Object
net.headmonitor.MonitorLibSpigot.builders.ItemBuilder
Direct Known Subclasses:
SkullBuilder

public class ItemBuilder extends Object
  • Field Details Link icon

    • material Link icon

      protected org.bukkit.Material material
    • name Link icon

      protected net.kyori.adventure.text.Component name
    • lore Link icon

      protected List<net.kyori.adventure.text.Component> lore
    • enchantments Link icon

      protected Map<org.bukkit.enchantments.Enchantment, Integer> enchantments
    • itemFlags Link icon

      protected final List<org.bukkit.inventory.ItemFlag> itemFlags
  • Constructor Details Link icon

    • ItemBuilder Link icon

      public ItemBuilder()
  • Method Details Link icon

    • material Link icon

      public ItemBuilder material(org.bukkit.Material material)
      Set the Material of the ItemStack.
      Parameters:
      material - The Material to set.
    • name Link icon

      public ItemBuilder name(net.kyori.adventure.text.Component name)
      Set the Name of the ItemStack from a Component Text.
      Parameters:
      name - The Name Component.
    • name Link icon

      public ItemBuilder name(String 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 Link icon

      public ItemBuilder lore(List<net.kyori.adventure.text.Component> lore)
      Set the Lore of the ItemStack from a Component Text List.
      Parameters:
      lore - The Lore Component List.
    • lore Link icon

      public ItemBuilder lore(Collection<String> lore)
      Set the Lore of the ItemStack from a String Collection.
      Parameters:
      lore - The Lore String Collection.
    • addEnchantments Link icon

      public ItemBuilder addEnchantments(Map<org.bukkit.enchantments.Enchantment, Integer> enchantments)
      Add Enchantments to the ItemStack from a Map.
      Parameters:
      enchantments - The Enchantments Map.
    • addEnchantment Link icon

      public ItemBuilder addEnchantment(org.bukkit.enchantments.Enchantment enchantment, int level)
      Add an Enchantment to the ItemStack.
      Parameters:
      enchantment - The Enchantment to add.
      level - The Enchantment Level to add.
    • addEnchantment Link icon

      public ItemBuilder addEnchantment(org.bukkit.enchantments.Enchantment enchantment)
      Add an Enchantment to the ItemStack. Level will be set to 1.
      Parameters:
      enchantment - The Enchantment to add.
    • addItemFlags Link icon

      public ItemBuilder addItemFlags(org.bukkit.inventory.ItemFlag... itemFlag)
      ////////////////////////////////////////////////////////////////////////
    • addItemFlag Link icon

      public ItemBuilder addItemFlag(org.bukkit.inventory.ItemFlag itemFlag)
    • create Link icon

      public org.bukkit.inventory.ItemStack create()
      ////////////////////////////////////////////////////////////////////////