Enum Class AdvancementFrameType
java.lang.Object
java.lang.Enum<AdvancementFrameType>
com.fren_gor.ultimateAdvancementAPI.advancement.display.AdvancementFrameType
- All Implemented Interfaces:
Serializable
,Comparable<AdvancementFrameType>
,Constable
Describes which shape of an advancement frame in the advancement GUI.
The frame also contains the default title and description colors and the message that should be sent when the advancement is granted.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull AdvancementFrameType
Returns the appropriateAdvancementFrameType
for the provided NMS wrapperAdvancementFrameTypeWrapper
.Gets the message that should be sent when the advancement is granted.getColor()
Gets the default title and description colors.Gets theAdvancementFrameType
NMS wrapper.static AdvancementFrameType
Returns the enum constant of this class with the specified name.static AdvancementFrameType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TASK
A frame with squared shape. The default color isChatColor.GREEN
. -
GOAL
A frame with rounded top and bottom. The default color isChatColor.GREEN
. -
CHALLENGE
A frame with thorns at the corners. The default color isChatColor.DARK_PURPLE
.
-
-
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
-
fromNMS
@NotNull public static @NotNull AdvancementFrameType fromNMS(@NotNull @NotNull AdvancementFrameTypeWrapper nms) Returns the appropriateAdvancementFrameType
for the provided NMS wrapperAdvancementFrameTypeWrapper
.- Parameters:
nms
- The NMS wrapper forAdvancementFrameType
.- Returns:
- The appropriate
AdvancementFrameType
. - Throws:
IllegalArgumentException
- If a non-mappedAdvancementFrameType
is passed as input. Should never happen.
-
getNMSWrapper
Gets theAdvancementFrameType
NMS wrapper.- Returns:
- The
AdvancementFrameType
NMS wrapper.
-
getColor
Gets the default title and description colors.- Returns:
- The default title and description colors.
-
getChatText
Gets the message that should be sent when the advancement is granted.Note: this is not the complete message.
- Returns:
- The message that should be sent when the advancement is granted.
- See Also:
-