Class AbstractItemStackBuilder<B extends AbstractItemStackBuilder<B>>

java.lang.Object
com.guflimc.brick.gui.spigot.item.AbstractItemStackBuilder<B>
Direct Known Subclasses:
BannerBuilder, BookBuilder, FireworkBuilder, ItemStackBuilder, LeatherArmorBuilder, PotionBuilder, ShieldBuilder, SkullBuilder

public abstract class AbstractItemStackBuilder<B extends AbstractItemStackBuilder<B>> extends Object
  • Field Details

    • itemStack

      protected final org.bukkit.inventory.ItemStack itemStack
  • Constructor Details

    • AbstractItemStackBuilder

      protected AbstractItemStackBuilder(org.bukkit.inventory.ItemStack itemStack)
  • Method Details

    • build

      public org.bukkit.inventory.ItemStack build()
    • transform

      public B transform(Consumer<org.bukkit.inventory.ItemStack> is)
    • apply

      public B apply(Consumer<B> consumer)
    • apply

      public B apply(boolean condition, Consumer<B> consumer)
    • apply

      public B apply(boolean condition, Consumer<B> consumer, Consumer<B> elseConsumer)
    • applyMeta

      public B applyMeta(Consumer<org.bukkit.inventory.meta.ItemMeta> meta)
    • applyMeta

      public <T extends org.bukkit.inventory.meta.ItemMeta> B applyMeta(Class<T> type, Consumer<T> meta)
    • withName

      public B withName(String name)
    • withName

      public B withName(net.kyori.adventure.text.Component name)
    • withType

      public B withType(org.bukkit.Material material)
    • withLore

      public B withLore(String... lines)
    • withLore

      public B withLore(net.kyori.adventure.text.Component... lines)
    • withLore

      public B withLore(Iterable<String> lines)
    • clearLore

      public B clearLore()
    • withToolDamage

      public B withToolDamage(int damage)
    • withAmount

      public B withAmount(int amount)
    • withEnchantment

      public B withEnchantment(org.bukkit.enchantments.Enchantment enchantment, int level)
    • withEnchantment

      public B withEnchantment(org.bukkit.enchantments.Enchantment enchantment)
    • clearEnchantments

      public B clearEnchantments()
    • withItemFlag

      public B withItemFlag(org.bukkit.inventory.ItemFlag... flags)
    • withoutItemFlag

      public B withoutItemFlag(org.bukkit.inventory.ItemFlag... flags)
    • hideAttributes

      public B hideAttributes()
    • showAttributes

      public B showAttributes()