Interface CustomAdvancementDisplay.Builder

Enclosing interface:
CustomAdvancementDisplay

public static sealed interface CustomAdvancementDisplay.Builder
Builder interface for creating and configuring CustomAdvancementDisplay instances.
  • Method Details

    • icon

      CustomAdvancementDisplay.Builder icon(org.bukkit.inventory.ItemStack icon)
      Sets the icon for the advancement.
      Parameters:
      icon - the ItemStack to use as the icon
      Returns:
      this builder instance for chaining
    • icon

      default CustomAdvancementDisplay.Builder icon(org.bukkit.Material icon)
      Sets the icon for the advancement using a material type.
      Parameters:
      icon - the Material to use as the icon
      Returns:
      this builder instance for chaining
    • icon

      default CustomAdvancementDisplay.Builder icon(org.bukkit.inventory.ItemStack item, Consumer<org.bukkit.inventory.ItemStack> consumer)
      Sets the icon for the advancement and allows modification of the ItemStack.
      Parameters:
      item - the ItemStack to be used as the icon
      consumer - a consumer to modify the ItemStack
      Returns:
      this builder instance for chaining
    • title

      CustomAdvancementDisplay.Builder title(net.kyori.adventure.text.Component title)
      Sets the title of the advancement.
      Parameters:
      title - the title as a Component
      Returns:
      this builder instance for chaining
    • description

      CustomAdvancementDisplay.Builder description(net.kyori.adventure.text.Component description)
      Sets the description of the advancement.
      Parameters:
      description - the description as a Component
      Returns:
      this builder instance for chaining
    • frame

      Sets the frame type for the advancement.

      This controls the visual style and purpose of the advancement.

      Parameters:
      frame - the CustomAdvancementDisplay.Frame type
      Returns:
      this builder instance for chaining
    • showToast

      CustomAdvancementDisplay.Builder showToast(boolean showToast)
      Sets whether a notification toast should be shown when the advancement is achieved.
      Parameters:
      showToast - true to show the toast, otherwise false
      Returns:
      this builder instance for chaining
    • announceToChat

      CustomAdvancementDisplay.Builder announceToChat(boolean announceToChat)
      Sets whether the advancement should be announced in chat when achieved.
      Parameters:
      announceToChat - true to announce in chat, otherwise false
      Returns:
      this builder instance for chaining
    • hidden

      CustomAdvancementDisplay.Builder hidden(boolean hidden)
      Sets whether the advancement should remain hidden until achieved.
      Parameters:
      hidden - true if hidden, otherwise false
      Returns:
      this builder instance for chaining
    • build

      Builds and returns the CustomAdvancementDisplay instance.
      Returns:
      the built custom advancement display