Package net.apartium.cocoabeans.commands
Interface CommandProcessingContext
- All Known Implementing Classes:
SimpleCommandProcessingContext
public interface CommandProcessingContext
Represents the context of processing the command's arguments
-
Method Summary
Modifier and TypeMethodDescriptionargs()Returns an unmodifiable list representing all the args left to processintindex()Returns the current index of processinglabel()Returns the label of the commandvoidreport(Object source, @NotNull BadCommandResponse response) Report a problem with command parsing, such as invalid arguments@NotNull Sendersender()Sender instancesenderMeetsRequirement(Requirement requirement) Check if sender meets given requirement instance.
-
Method Details
-
sender
Sender instance- Returns:
- sender instance
-
label
String label()Returns the label of the command- Returns:
- label of the command
-
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
Check if sender meets given requirement instance.- Parameters:
requirement- requirement to meet- Returns:
- requirement result
-
report
Report a problem with command parsing, such as invalid arguments- Parameters:
source- source reporter of the problemresponse- response error description object
-