Package net.luckperms.api.track
Enum Class PromotionResult.Status
- All Implemented Interfaces:
Serializable,Comparable<PromotionResult.Status>,java.lang.constant.Constable,Result
- Enclosing interface:
- PromotionResult
The result status
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIndicates that the user was added to the first group in the track.Indicates that the implementation was unable to determine the users current position on this track.Indicates that the user is already a member of the group at the end of the track, and as such cannot be promoted any further.Indicates that the next group in the track no longer exists.Indicates that the user was promoted normally.An undefined failure occurred. -
Field Summary
Fields inherited from interface net.luckperms.api.util.Result
GENERIC_FAILURE, GENERIC_SUCCESS -
Method Summary
Modifier and TypeMethodDescriptionstatic PromotionResult.StatusReturns the enum constant of this class with the specified name.static PromotionResult.Status[]values()Returns an array containing the constants of this enum class, in the order they are declared.booleanGets if the operation which produced this result completed successfully.
-
Enum Constant Details
-
SUCCESS
Indicates that the user was promoted normally. -
ADDED_TO_FIRST_GROUP
Indicates that the user was added to the first group in the track.This usually occurs when the user isn't already on any of the groups in the track.
-
MALFORMED_TRACK
Indicates that the next group in the track no longer exists. -
END_OF_TRACK
Indicates that the user is already a member of the group at the end of the track, and as such cannot be promoted any further. -
AMBIGUOUS_CALL
Indicates that the implementation was unable to determine the users current position on this track.This usually occurs when the user is on more than one group on the track.
-
UNDEFINED_FAILURE
An undefined failure occurred.
-
-
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
-
wasSuccessful
public boolean wasSuccessful()Description copied from interface:ResultGets if the operation which produced this result completed successfully.- Specified by:
wasSuccessfulin interfaceResult- Returns:
- if the result indicates a success
-