Package net.luckperms.api.track
Interface DemotionResult
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classDemotionResult.StatusThe result status
-
Field Summary
-
Fields inherited from interface net.luckperms.api.util.Result
GENERIC_FAILURE, GENERIC_SUCCESS
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description @NonNull Optional<String>getGroupFrom()Gets the name of the group the user was demoted from, if applicable.@NonNull Optional<String>getGroupTo()Gets the name of the group the user was demoted from, if applicable.@NonNull DemotionResult.StatusgetStatus()Gets the status of the result.default booleanwasSuccessful()Gets if the operation which produced this result completed successfully.
-
-
-
Method Detail
-
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
@NonNull Optional<String> 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
@NonNull Optional<String> 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.
-
-