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
Modifier and TypeInterfaceDescriptionstatic enum
Defines how theicon()
appears in the advancements screen and the color used with theadvancement name
. -
Method Summary
Modifier and TypeMethodDescriptionGets the texture displayed behind the advancement tree when selected.Gets the description.boolean
Gets whether a message should be sent in the chat.boolean
Gets whether a toast should be displayed.frame()
Gets theAdvancementDisplay.Frame
.icon()
Gets the icon shown in the frame in the advancements screen.boolean
isHidden()
Gets whether this advancement is hidden.title()
Gets the advancement title.
-
Method Details
-
frame
Gets theAdvancementDisplay.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
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
-