Package com.griefdefender.api.claim
Interface ClaimResult
public interface ClaimResult
-
Method Summary
Modifier and TypeMethodDescriptiondefault @Nullable ClaimgetClaim()Gets the first resulting claim.Gets an immutable list of resulting claims.Optional<net.kyori.adventure.text.Component> Gets the result message.Gets theClaimResultTypeof claim action which adds extra context when result is not a success.default booleanA simple helper method to determine if theClaimResultwas a success.
-
Method Details
-
getResultType
ClaimResultType getResultType()Gets theClaimResultTypeof claim action which adds extra context when result is not a success.- Returns:
- The result type
-
getMessage
Optional<net.kyori.adventure.text.Component> getMessage()Gets the result message. Note: normally this is set during event cancellations.- Returns:
- The result message, if available
-
getClaims
Gets an immutable list of resulting claims.Examples of list contents:
- Is empty for when an event such as
CreateClaimEventis cancelled - Contains a single claim if
ClaimResultType.SUCCESSis returned - Contains one or more claims if
ClaimResultType.OVERLAPPING_CLAIMis returned
ClaimResultTypefor complete list of return results.- Returns:
- The immutable list of resulting claims if available, otherwise an empty list
- Is empty for when an event such as
-
getClaim
Gets the first resulting claim. Note: This is a helper method for results that will usually always contain one claim instead of callinggetClaims().- Returns:
- The result claim, if available
-
successful
default boolean successful()A simple helper method to determine if theClaimResultwas a success.- Returns:
- Whether the claim result was a success
-