Package net.luckperms.api.track
Interface DemotionResult
- All Superinterfaces:
Result
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface net.luckperms.api.util.Result
GENERIC_FAILURE, GENERIC_SUCCESS -
Method Summary
Modifier and TypeMethodDescriptionGets the name of the group the user was demoted from, if applicable.Gets the name of the group the user was demoted from, if applicable.Gets the status of the result.default booleanGets if the operation which produced this result completed successfully.
-
Method Details
-
getStatus
@NonNull DemotionResult.Status getStatus()Gets the status of the result.- Returns:
- the status
-
wasSuccessful
default 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
-
getGroupFrom
Gets the name of the group the user was demoted from, if applicable.Will only be present for results with a
statusofDemotionResult.Status.SUCCESSorDemotionResult.Status.REMOVED_FROM_FIRST_GROUP.The value will also be set for results with the
DemotionResult.Status.MALFORMED_TRACKstatus, with this value marking the group which no longer exists.- Returns:
- the group the user was demoted from.
-
getGroupTo
Gets the name of the group the user was demoted from, if applicable.Will only be present for results with a
statusofDemotionResult.Status.SUCCESS.- Returns:
- the group the user was demoted to.
-