Interface CommandRequirement<S>

Type Parameters:
S - the sender type

public interface CommandRequirement<S>
Represents a requirement/criteria that must be true for the command to be executed
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    accepts(S sender, Context<S> commandContext)
    Whether the criteria are true or not
    @Nullable CaptionKey
    The caption that will be sent to the user if the criteria is false
  • Method Details

    • accepts

      boolean accepts(S sender, Context<S> commandContext)
      Whether the criteria are true or not
      Parameters:
      sender - the command sender
      commandContext - the context used
      Returns:
      Whether the criteria are true or not
    • caption

      @Nullable @Nullable CaptionKey caption()
      The caption that will be sent to the user if the criteria is false
      Returns:
      null if no caption to send, otherwise it will return the key of the caption to send