Package io.papermc.paper.advancement
Enum Class AdvancementDisplay.Frame
- All Implemented Interfaces:
Serializable
,Comparable<AdvancementDisplay.Frame>
,Constable
,Translatable
- Enclosing interface:
- AdvancementDisplay
public static enum AdvancementDisplay.Frame
extends Enum<AdvancementDisplay.Frame>
implements Translatable
Defines how the
AdvancementDisplay.icon()
appears in the advancements screen and
the color used with the advancement name
.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Index<String,
AdvancementDisplay.Frame> The name map. -
Method Summary
Modifier and TypeMethodDescriptioncolor()
Gets theTextColor
used for the advancement name.Gets the translation key used when an advancement is completed.static AdvancementDisplay.Frame
Returns the enum constant of this class with the specified name.static AdvancementDisplay.Frame[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CHALLENGE
"Challenge complete" advancement.The client will play the
ui.toast.challenge_complete
sound when the challenge is completed and the toast is shown. -
GOAL
"Goal reached" advancement. -
TASK
"Advancement made" advancement.
-
-
Field Details
-
NAMES
The name map.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
color
Gets theTextColor
used for the advancement name.- Returns:
- the text color
-
translationKey
Gets the translation key used when an advancement is completed.This is the first line of the toast displayed by the client.
- Specified by:
translationKey
in interfaceTranslatable
- Returns:
- the toast message key
-