Package net.luckperms.api.track
Enum PromotionResult.Status
- java.lang.Object
-
- java.lang.Enum<PromotionResult.Status>
-
- net.luckperms.api.track.PromotionResult.Status
-
- All Implemented Interfaces:
Serializable,Comparable<PromotionResult.Status>,Result
- Enclosing interface:
- PromotionResult
public static enum PromotionResult.Status extends Enum<PromotionResult.Status> implements Result
The result status
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ADDED_TO_FIRST_GROUPIndicates that the user was added to the first group in the track.AMBIGUOUS_CALLIndicates that the implementation was unable to determine the users current position on this track.END_OF_TRACKIndicates that the user is already a member of the group at the end of the track, and as such cannot be promoted any further.MALFORMED_TRACKIndicates that the next group in the track no longer exists.SUCCESSIndicates that the user was promoted normally.UNDEFINED_FAILUREAn undefined failure occurred.
-
Field Summary
-
Fields inherited from interface net.luckperms.api.util.Result
GENERIC_FAILURE, GENERIC_SUCCESS
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PromotionResult.StatusvalueOf(String name)Returns the enum constant of this type with the specified name.static PromotionResult.Status[]values()Returns an array containing the constants of this enum type, in the order they are declared.booleanwasSuccessful()Gets if the operation which produced this result completed successfully.
-
-
-
Enum Constant Detail
-
SUCCESS
public static final PromotionResult.Status SUCCESS
Indicates that the user was promoted normally.
-
ADDED_TO_FIRST_GROUP
public static final PromotionResult.Status 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
public static final PromotionResult.Status MALFORMED_TRACK
Indicates that the next group in the track no longer exists.
-
END_OF_TRACK
public static final PromotionResult.Status 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
public static final PromotionResult.Status 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
public static final PromotionResult.Status UNDEFINED_FAILURE
An undefined failure occurred.
-
-
Method Detail
-
values
public static PromotionResult.Status[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PromotionResult.Status c : PromotionResult.Status.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PromotionResult.Status valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type 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
-
-