Interface AdvancementDisplay


public interface AdvancementDisplay
Describes the display of an advancement.

The display is used in the chat, in the toast messages and the advancements screen.

  • Method Details

    • frame

      Gets the AdvancementDisplay.Frame.

      This defines the appearance of the tile in the advancements screen and the text when it's completed.

      Returns:
      the frame type
    • title

      Gets the advancement title.
      Returns:
      the title
    • description

      @NotNull @NotNull Component description()
      Gets the description.
      Returns:
      the description
    • icon

      Gets the icon shown in the frame in the advancements screen.
      Returns:
      a copy of the icon
    • doesShowToast

      boolean doesShowToast()
      Gets whether a toast should be displayed.

      A toast is a notification that will be displayed in the top right corner of the screen.

      Returns:
      true if a toast should be shown
    • doesAnnounceToChat

      boolean doesAnnounceToChat()
      Gets whether a message should be sent in the chat.
      Returns:
      true if a message should be sent
      See Also:
    • isHidden

      boolean isHidden()
      Gets whether this advancement is hidden.

      Hidden advancements cannot be viewed by the player until they have been unlocked.

      Returns:
      true if hidden
    • backgroundPath

      Gets the texture displayed behind the advancement tree when selected.

      This only affects root advancements without any parent. If the background is not specified or doesn't exist, the tab background will be the missing texture.

      Returns:
      the background texture path
    • displayName

      @NotNull @NotNull Component displayName()
      Gets the formatted display name for this display. This is a part of the component that would be shown in chat when a player completes the advancement.
      Returns:
      the display name
      See Also: