Package net.luckperms.api.model.data
Enum DataMutateResult
- java.lang.Object
-
- java.lang.Enum<DataMutateResult>
-
- net.luckperms.api.model.data.DataMutateResult
-
- All Implemented Interfaces:
Serializable,Comparable<DataMutateResult>,Result
public enum DataMutateResult extends Enum<DataMutateResult> implements Result
Represents the result of a data mutation call on a LuckPerms object.Usually as the result to a call on a
PermissionHolderorTrack.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceDataMutateResult.WithMergedNodeExtension ofDataMutateResultfor temporary set operations.
-
Enum Constant Summary
Enum Constants Enum Constant Description FAILIndicates the mutation failedFAIL_ALREADY_HASIndicates the mutation failed because the subject of the action already has somethingFAIL_LACKSIndicates the mutation failed because the subject of the action lacks somethingSUCCESSIndicates the mutation was a success
-
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 DataMutateResultvalueOf(String name)Returns the enum constant of this type with the specified name.static DataMutateResult[]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 DataMutateResult SUCCESS
Indicates the mutation was a success
-
FAIL
public static final DataMutateResult FAIL
Indicates the mutation failed
-
FAIL_ALREADY_HAS
public static final DataMutateResult FAIL_ALREADY_HAS
Indicates the mutation failed because the subject of the action already has something
-
FAIL_LACKS
public static final DataMutateResult FAIL_LACKS
Indicates the mutation failed because the subject of the action lacks something
-
-
Method Detail
-
values
public static DataMutateResult[] 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 (DataMutateResult c : DataMutateResult.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DataMutateResult 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
-
-