Package net.luckperms.api.model.data
Enum Class DataMutateResult
- All Implemented Interfaces:
Serializable,Comparable<DataMutateResult>,java.lang.constant.Constable,Result
Represents the result of a data mutation call on a LuckPerms object.
Usually as the result to a call on a PermissionHolder or Track.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceExtension ofDataMutateResultfor temporary set operations.Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIndicates the mutation failedIndicates the mutation failed because the subject of the action already has somethingIndicates the mutation failed because the subject of the action lacks somethingIndicates the mutation was a success -
Field Summary
Fields inherited from interface net.luckperms.api.util.Result
GENERIC_FAILURE, GENERIC_SUCCESS -
Method Summary
Modifier and TypeMethodDescriptionstatic DataMutateResultReturns the enum constant of this class with the specified name.static DataMutateResult[]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 the mutation was a success -
FAIL
Indicates the mutation failed -
FAIL_ALREADY_HAS
Indicates the mutation failed because the subject of the action already has something -
FAIL_LACKS
Indicates the mutation failed because the subject of the action lacks something
-
-
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
-