Class ClaimResult<C extends IPlayerChunkClaimAPI>

java.lang.Object
xaero.pac.common.claims.result.api.ClaimResult<C>

public class ClaimResult<C extends IPlayerChunkClaimAPI> extends Object
A claim result for a single chunk
  • Constructor Details

    • ClaimResult

      public ClaimResult(@Nullable C claimResult, @Nonnull ClaimResult.Type resultType)
      A constructor for internal usage
      Parameters:
      claimResult - the claim state where relevant
      resultType - the result type
    • ClaimResult

      public ClaimResult(@Nullable C claimResult, @Nonnull ClaimResult.Type resultType, @Nullable net.minecraft.network.chat.Component customReason)
      A constructor for internal usage
      Parameters:
      claimResult - the claim state where relevant
      resultType - the result type
      customReason - the custom reason given by an addon for this result, can be null
  • Method Details

    • getClaimResult

      @Nullable public C getClaimResult()
      Gets the claim state associated with this result where relevant.
      Returns:
      the claim state for this result, can be null
    • getResultType

      @Nonnull public ClaimResult.Type getResultType()
      Gets the ClaimResult.Type of this result.
      Returns:
      the type of this result, not null
    • getCustomReason

      @Nullable public net.minecraft.network.chat.Component getCustomReason()
      Gets the text Component with the custom reason given by an addon for this result.
      Returns:
      the custom reason Component, null if there isn't one
    • getMessage

      @Nonnull public net.minecraft.network.chat.Component getMessage()
      Gets the display message for this result, applying the custom reason given by an addon when it exists.
      Returns:
      the display message for this result