Package net.luckperms.api.track
Interface PromotionResult
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classPromotionResult.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 promoted from, if applicable.@NonNull Optional<String>getGroupTo()Gets the name of the group the user was promoted from, if applicable.@NonNull PromotionResult.StatusgetStatus()Gets the status of the result.default booleanwasSuccessful()Gets if the operation which produced this result completed successfully.
-
-
-
Method Detail
-
getStatus
@NonNull PromotionResult.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 promoted from, if applicable.Will only be present for results with a
statusofPromotionResult.Status.SUCCESS.- Returns:
- the group the user was promoted from.
-
getGroupTo
@NonNull Optional<String> getGroupTo()
Gets the name of the group the user was promoted from, if applicable.Will only be present for results with a
statusofPromotionResult.Status.SUCCESSorPromotionResult.Status.ADDED_TO_FIRST_GROUP.The value will also be set for results with the
PromotionResult.Status.MALFORMED_TRACKstatus, with this value marking the group which no longer exists.- Returns:
- the group the user was promoted to.
-
-