Package io.papermc.paper.advancement

# 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.

## Nested Class Summary

Nested Classes
Modifier and Type
Interface
Description
`static enum`
`AdvancementDisplay.Frame`
Defines how the `icon()` appears in the advancements screen and the color used with the `advancement name`.

## Method Summary

Modifier and Type
Method
Description
`@Nullable NamespacedKey`
`backgroundPath()`
Gets the texture displayed behind the advancement tree when selected.
`@NotNull Component`
`description()`
Gets the description.
`@NotNull Component`
`displayName()`
Gets the formatted display name for this display.
`boolean`
`doesAnnounceToChat()`
Gets whether a message should be sent in the chat.
`boolean`
`doesShowToast()`
Gets whether a toast should be displayed.
`@NotNull AdvancementDisplay.Frame`
`frame()`
Gets the `AdvancementDisplay.Frame`.
`@NotNull ItemStack`
`icon()`
Gets the icon shown in the frame in the advancements screen.
`boolean`
`isHidden()`
Gets whether this advancement is hidden.
`@NotNull Component`
`title()`
Gets the advancement title.

## Method Details

### frame

@NotNull @NotNull AdvancementDisplay.Frame 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

@NotNull @NotNull Component title()
Gets the advancement title.

Returns:
  the title

### description

@NotNull @NotNull Component description()
Gets the description.

Returns:
  the description

### icon

@NotNull @NotNull ItemStack 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:
  - `to edit the message`

### 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

@Nullable @Nullable NamespacedKey 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:
  - `Advancement.displayName()`