Interface CommandProcessingContext

All Known Implementing Classes:
SimpleCommandProcessingContext

public interface CommandProcessingContext
Represents the context of processing the command's arguments
  • Method Details

    • sender

      @NotNull @NotNull Sender sender()
      Sender instance
      Returns:
      sender instance
    • label

      String label()
      Returns the label of the command
      Returns:
      label of the command
    • args

      List<String> args()
      Returns an unmodifiable list representing all the args left to process
      Returns:
      unmodifiable list representing all the args left to process
    • index

      int index()
      Returns the current index of processing
      Returns:
      current index of processing
    • senderMeetsRequirement

      RequirementResult senderMeetsRequirement(Requirement requirement)
      Check if sender meets given requirement instance.
      Parameters:
      requirement - requirement to meet
      Returns:
      requirement result
    • report

      @AvailableSince("0.0.30") void report(Object source, @NotNull @NotNull BadCommandResponse response)
      Report a problem with command parsing, such as invalid arguments
      Parameters:
      source - source reporter of the problem
      response - response error description object