Package com.griefdefender.api.claim
Interface TrustResult
public interface TrustResult
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic TrustResult.Builderbuilder()Gets a newTrustResultbuilder instance.default @Nullable ClaimgetClaim()Gets the first resulting claim.Gets an unmodifiable list of resulting claims involved in trust action.Optional<net.kyori.adventure.text.Component> Gets the result message.Gets theTrustResultTypeof trust action which adds extra context when result is a success or not.getUser()Gets theUserinvolved in trust action.default booleanWhether the trust result was a success.
-
Method Details
-
getResultType
TrustResultType getResultType()Gets theTrustResultTypeof trust action which adds extra context when result is a success or not.- 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 unmodifiable list of resulting claims involved in trust action.- Returns:
- The unmodifiable list of resulting claims if available, otherwise an empty list
-
getUser
User getUser()Gets theUserinvolved in trust action.- Returns:
- The user
-
getRequiredTrust
TrustType getRequiredTrust()- Returns:
- The trust type
-
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
-
successful
default boolean successful()Whether the trust result was a success.- Returns:
- Whether the trust result was a success
-
builder
Gets a newTrustResultbuilder instance.- Returns:
- A new claim builder instance
-