Interface CustomAdvancementDisplay


public sealed interface CustomAdvancementDisplay
Represents the display properties of a custom advancement.

Custom advancements can have custom icons, titles, descriptions, and other visual and behavioral settings shown to players. This interface provides a set of methods to access and configure such display settings.

The icon() and the title() of the root advancement are used in the tab's display data.

  • Method Details

    • display

      Creates a new builder for configuring and building a CustomAdvancementDisplay.
      Returns:
      the builder instance
    • empty

      static CustomAdvancementDisplay empty()
      Returns an empty implementation of CustomAdvancementDisplay, containing default values.
      Returns:
      an empty custom advancement display
    • icon

      org.bukkit.inventory.ItemStack icon()
      Gets the icon associated with the advancement.
      Returns:
      the ItemStack icon
    • title

      net.kyori.adventure.text.Component title()
      Gets the title of the advancement.
      Returns:
      the title as a Component
    • description

      net.kyori.adventure.text.Component description()
      Gets the description of the advancement.
      Returns:
      the description as a Component
    • frame

      Gets the frame type of the advancement, which informs the visual style and importance.
      Returns:
      the CustomAdvancementDisplay.Frame type
    • showToast

      boolean showToast()
      Checks whether a notification toast is shown to the player when the advancement is achieved.
      Returns:
      true if the toast is shown, otherwise false
    • announceToChat

      boolean announceToChat()
      Checks whether the advancement is announced in the chat when achieved.
      Returns:
      true if the achievement is announced, otherwise false
    • hidden

      boolean hidden()
      Checks whether the advancement is hidden until it is unlocked.
      Returns:
      true if hidden, otherwise false