Class AdvancementDisplay.Builder

java.lang.Object
com.github.darksoulq.abyssallib.world.advancement.AdvancementDisplay.Builder
Enclosing class:
AdvancementDisplay

public static class AdvancementDisplay.Builder extends Object
A fluent builder class for creating AdvancementDisplay instances.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • title

      public AdvancementDisplay.Builder title(net.kyori.adventure.text.Component title)
      Sets the title for the advancement.
      Parameters:
      title - The Adventure Component title.
      Returns:
      This builder instance for chaining.
    • description

      public AdvancementDisplay.Builder description(net.kyori.adventure.text.Component description)
      Sets the description for the advancement.
      Parameters:
      description - The Adventure Component description.
      Returns:
      This builder instance for chaining.
    • icon

      public AdvancementDisplay.Builder icon(org.bukkit.inventory.ItemStack icon)
      Sets the icon for the advancement.
      Parameters:
      icon - The ItemStack to display.
      Returns:
      This builder instance for chaining.
    • background

      public AdvancementDisplay.Builder background(net.kyori.adventure.key.Key background)
      Sets the background texture for the advancement.
      Parameters:
      background - The resource Key for the background.
      Returns:
      This builder instance for chaining.
    • frame

      Sets the frame style for the advancement.
      Parameters:
      frame - The AdvancementFrame style.
      Returns:
      This builder instance for chaining.
    • showToast

      public AdvancementDisplay.Builder showToast(boolean showToast)
      Sets whether to show a toast notification.
      Parameters:
      showToast - True to show toast.
      Returns:
      This builder instance for chaining.
    • announceToChat

      public AdvancementDisplay.Builder announceToChat(boolean announceToChat)
      Sets whether to announce completion to chat.
      Parameters:
      announceToChat - True to announce.
      Returns:
      This builder instance for chaining.
    • hidden

      public AdvancementDisplay.Builder hidden(boolean hidden)
      Sets whether the advancement is hidden.
      Parameters:
      hidden - True to hide.
      Returns:
      This builder instance for chaining.
    • x

      public AdvancementDisplay.Builder x(float x)
      Sets the horizontal position in the tree.
      Parameters:
      x - The X position.
      Returns:
      This builder instance for chaining.
    • y

      public AdvancementDisplay.Builder y(float y)
      Sets the vertical position in the tree.
      Parameters:
      y - The Y position.
      Returns:
      This builder instance for chaining.
    • build

      public AdvancementDisplay build()
      Finalizes the creation of the AdvancementDisplay instance.
      Returns:
      A new AdvancementDisplay instance.