Package dev.polv.taleapi.command
Class CommandContext.Builder
java.lang.Object
dev.polv.taleapi.command.CommandContext.Builder
- Enclosing class:
- CommandContext
Builder for constructing
CommandContext instances.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the CommandContext.withArgument(String name, Object value) Adds a parsed argument to the context.withArguments(Map<String, Object> args) Adds all arguments from a map to the context.withCommand(Command command) Sets the command being executed.
-
Method Details
-
withArgument
Adds a parsed argument to the context.- Parameters:
name- the argument namevalue- the parsed value- Returns:
- this builder
-
withArguments
Adds all arguments from a map to the context.- Parameters:
args- the arguments to add- Returns:
- this builder
-
withCommand
Sets the command being executed.- Parameters:
command- the command- Returns:
- this builder
-
build
Builds the CommandContext.- Returns:
- the constructed CommandContext
-