Interface TrustResult


public interface TrustResult
  • Method Details

    • getResultType

      TrustResultType getResultType()
      Gets the TrustResultType of 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

      List<Claim> 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 the User involved in trust action.
      Returns:
      The user
    • getRequiredTrust

      TrustType getRequiredTrust()
      Gets the TrustType required for User.
      Returns:
      The trust type
    • getClaim

      default @Nullable Claim getClaim()
      Gets the first resulting claim. Note: This is a helper method for results that will usually always contain one claim instead of calling getClaims().
      Returns:
      The result claim
    • successful

      default boolean successful()
      Whether the trust result was a success.
      Returns:
      Whether the trust result was a success
    • builder

      static TrustResult.Builder builder()
      Gets a new TrustResult builder instance.
      Returns:
      A new claim builder instance