Interface ClaimResult


public interface ClaimResult
  • Method Details

    • getResultType

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

      List<Claim> getClaims()
      Gets an immutable list of resulting claims.

      Examples of list contents:

      Refer to ClaimResultType for complete list of return results.
      Returns:
      The immutable list of resulting claims if available, otherwise an empty list
    • 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, if available
    • successful

      default boolean successful()
      A simple helper method to determine if the ClaimResult was a success.
      Returns:
      Whether the claim result was a success