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 CommandContext
build()
Builds theCommandContext
SimpleCommandContext.SimpleCommandContextBuilder
setArguments(@NotNull String[] arguments)
Sets the arguments.SimpleCommandContext.SimpleCommandContextBuilder
setArguments(List<Argument> arguments)
Sets the arguments.SimpleCommandContext.SimpleCommandContextBuilder
setCommand(Command command)
Sets the executed command.SimpleCommandContext.SimpleCommandContextBuilder
setLabel(String label)
Sets the string used to specify the command.SimpleCommandContext.SimpleCommandContextBuilder
setSender(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
-
-