Class ItemBuilder


public class ItemBuilder extends BaseItemBuilder<ItemBuilder>
Main ItemBuilder
  • Method Details

    • from

      @NotNull @Contract("_ -> new") public static @NotNull ItemBuilder from(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack)
      Main method to create ItemBuilder
      Parameters:
      itemStack - The ItemStack you want to edit
      Returns:
      A new ItemBuilder
    • from

      @NotNull @Contract("_ -> new") public static @NotNull ItemBuilder from(@NotNull @NotNull org.bukkit.Material material)
      Alternative method to create ItemBuilder
      Parameters:
      material - The Material you want to create an item from
      Returns:
      A new ItemBuilder
    • banner

      @NotNull @Contract(" -> new") public static @NotNull BannerBuilder banner()
      Method for creating a BannerBuilder which will have BANNER specific methods
      Returns:
      A new BannerBuilder
      Since:
      3.0.1
    • banner

      @NotNull @Contract("_ -> new") public static @NotNull BannerBuilder banner(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack)
      Method for creating a BannerBuilder which will have BANNER specific methods
      Parameters:
      itemStack - An existing BANNER ItemStack
      Returns:
      A new BannerBuilder
      Throws:
      GuiException - if the item is not a BANNER
      Since:
      3.0.1
    • book

      @NotNull @Contract("_ -> new") public static @NotNull BookBuilder book(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack)
      Method for creating a BookBuilder which will have Material.WRITABLE_BOOK / Material.WRITTEN_BOOK specific methods
      Parameters:
      itemStack - an existing Material.WRITABLE_BOOK / Material.WRITTEN_BOOK ItemStack
      Returns:
      A new FireworkBuilder
      Throws:
      GuiException - if the item type is not Material.WRITABLE_BOOK or Material.WRITTEN_BOOK
      Since:
      3.0.1
    • firework

      @NotNull @Contract(" -> new") public static @NotNull FireworkBuilder firework()
      Method for creating a FireworkBuilder which will have Material.FIREWORK_ROCKET specific methods
      Returns:
      A new FireworkBuilder
      Since:
      3.0.1
    • firework

      @NotNull @Contract("_ -> new") public static @NotNull FireworkBuilder firework(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack)
      Method for creating a FireworkBuilder which will have Material.FIREWORK_ROCKET specific methods
      Parameters:
      itemStack - an existing Material.FIREWORK_ROCKET ItemStack
      Returns:
      A new FireworkBuilder
      Throws:
      GuiException - if the item type is not Material.FIREWORK_ROCKET
      Since:
      3.0.1
    • map

      @NotNull @Contract(" -> new") public static @NotNull MapBuilder map()
      Method for creating a MapBuilder which will have Material.MAP specific methods
      Returns:
      A new MapBuilder
      Since:
      3.0.1
    • map

      @NotNull @Contract("_ -> new") public static @NotNull MapBuilder map(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack)
      Method for creating a MapBuilder which will have @link Material#MAP} specific methods
      Parameters:
      itemStack - An existing Material.MAP ItemStack
      Returns:
      A new MapBuilder
      Throws:
      GuiException - if the item type is not Material.MAP
      Since:
      3.0.1
    • skull

      @NotNull @Contract(" -> new") public static @NotNull SkullBuilder skull()
      Method for creating a SkullBuilder which will have PLAYER_HEAD specific methods
      Returns:
      A new SkullBuilder
    • skull

      @NotNull @Contract("_ -> new") public static @NotNull SkullBuilder skull(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack)
      Method for creating a SkullBuilder which will have PLAYER_HEAD specific methods
      Parameters:
      itemStack - An existing PLAYER_HEAD ItemStack
      Returns:
      A new SkullBuilder
      Throws:
      GuiException - if the item is not a player head
    • star

      @NotNull @Contract(" -> new") public static @NotNull FireworkBuilder star()
      Method for creating a FireworkBuilder which will have Material.FIREWORK_STAR specific methods
      Returns:
      A new FireworkBuilder
      Since:
      3.0.1
    • star

      @NotNull @Contract("_ -> new") public static @NotNull FireworkBuilder star(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack)
      Method for creating a FireworkBuilder which will have Material.FIREWORK_STAR specific methods
      Parameters:
      itemStack - an existing Material.FIREWORK_STAR ItemStack
      Returns:
      A new FireworkBuilder
      Throws:
      GuiException - if the item type is not Material.FIREWORK_STAR
      Since:
      3.0.1
    • setSkullTexture

      @Deprecated public ItemBuilder setSkullTexture(@NotNull @NotNull String texture)
      Deprecated.
      In favor of SkullBuilder.texture(String), nothing changed just the name, will be removed in 3.0.1
      Sets the skull texture
      Parameters:
      texture - The base64 texture
      Returns:
      ItemBuilder
    • setSkullOwner

      @Deprecated public ItemBuilder setSkullOwner(@NotNull @NotNull org.bukkit.OfflinePlayer player)
      Deprecated.
      In favor of SkullBuilder.owner(OfflinePlayer), nothing changed just the name, will be removed in 3.0.1
      Sets skull owner via bukkit methods
      Parameters:
      player - OfflinePlayer to set skull of
      Returns:
      ItemBuilder