Class SimpleCommandContext.SimpleCommandContextBuilder
- java.lang.Object
-
- com.github.siroshun09.mccommand.common.context.SimpleCommandContext.SimpleCommandContextBuilder
-
- Enclosing class:
- SimpleCommandContext
public static class SimpleCommandContext.SimpleCommandContextBuilder extends Object
Builder class ofCommandContext.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull CommandContextbuild()Builds theCommandContextSimpleCommandContext.SimpleCommandContextBuildersetArguments(@NotNull String[] arguments)Sets the arguments.SimpleCommandContext.SimpleCommandContextBuildersetArguments(List<Argument> arguments)Sets the arguments.SimpleCommandContext.SimpleCommandContextBuildersetCommand(Command command)Sets the executed command.SimpleCommandContext.SimpleCommandContextBuildersetLabel(String label)Sets the string used to specify the command.SimpleCommandContext.SimpleCommandContextBuildersetSender(Sender sender)Sets the commander.
-
-
-
Method Detail
-
setCommand
public SimpleCommandContext.SimpleCommandContextBuilder setCommand(Command command)
Sets the executed command.- Parameters:
command- the executed command- Returns:
- the builder instance
-
setSender
public SimpleCommandContext.SimpleCommandContextBuilder setSender(Sender sender)
Sets the commander.- Parameters:
sender- the commander- Returns:
- the builder instance
-
setArguments
public SimpleCommandContext.SimpleCommandContextBuilder setArguments(List<Argument> arguments)
Sets the arguments.- Parameters:
arguments- the given arguments- Returns:
- the builder instance
-
setArguments
public SimpleCommandContext.SimpleCommandContextBuilder setArguments(@NotNull @NotNull String[] arguments)
Sets the arguments.- Parameters:
arguments- the given arguments- Returns:
- the builder instance
- Throws:
NullPointerException- if arguments is null
-
setLabel
public SimpleCommandContext.SimpleCommandContextBuilder setLabel(String label)
Sets the string used to specify the command.- Parameters:
label- the string used to specify the command- Returns:
- the builder instance
-
build
@NotNull public @NotNull CommandContext build()
Builds theCommandContext- Returns:
- the
CommandContext - Throws:
NullPointerException- if any of the values are not set
-
-