Class SimpleCommandContext
- java.lang.Object
-
- com.github.siroshun09.mccommand.common.context.SimpleCommandContext
-
- All Implemented Interfaces:
CommandContext
public class SimpleCommandContext extends Object implements CommandContext
TheCommandContextimplementation class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSimpleCommandContext.SimpleCommandContextBuilderBuilder class ofCommandContext.
-
Constructor Summary
Constructors Constructor Description SimpleCommandContext(@NotNull Command command, @NotNull Sender sender, @NotNull List<Argument> arguments, @NotNull String label)Creates aSimpleCommandContext
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)@NotNull List<Argument>getArguments()Gets the given arguments.@NotNull CommandgetCommand()Gets the executed command.@NotNull StringgetLabel()Gets the string used to specify the command.@NotNull SendergetSender()Gets the commander.inthashCode()static @NotNull SimpleCommandContext.SimpleCommandContextBuildernewBuilder()Gets the newSimpleCommandContext.SimpleCommandContextBuilderStringtoString()
-
-
-
Constructor Detail
-
SimpleCommandContext
public SimpleCommandContext(@NotNull @NotNull Command command, @NotNull @NotNull Sender sender, @NotNull @NotNull List<Argument> arguments, @NotNull @NotNull String label)
Creates aSimpleCommandContext- Parameters:
command- the executed commandsender- the commanderarguments- the given argumentslabel- the string used to specify the command
-
-
Method Detail
-
newBuilder
@NotNull public static @NotNull SimpleCommandContext.SimpleCommandContextBuilder newBuilder()
Gets the newSimpleCommandContext.SimpleCommandContextBuilder- Returns:
- the new
SimpleCommandContext.SimpleCommandContextBuilder
-
getCommand
@NotNull public @NotNull Command getCommand()
Gets the executed command.- Specified by:
getCommandin interfaceCommandContext- Returns:
- the executed command
-
getSender
@NotNull public @NotNull Sender getSender()
Gets the commander.- Specified by:
getSenderin interfaceCommandContext- Returns:
- the commander
-
getArguments
@NotNull public @NotNull List<Argument> getArguments()
Gets the given arguments.- Specified by:
getArgumentsin interfaceCommandContext- Returns:
- the given arguments
-
getLabel
@NotNull public @NotNull String getLabel()
Gets the string used to specify the command.It may always return the same string as
Command.getName().- Specified by:
getLabelin interfaceCommandContext- Returns:
- the string used to specify the command
-
-