Class CommandContext
java.lang.Object
net.minestom.server.command.builder.CommandContext
Class used to retrieve argument data in a
CommandExecutor
.
All id are the one specified in the Argument
constructor.
All methods are @NotNull
in the sense that you should not have to verify their validity since if the syntax
is called, it means that all of its arguments are correct. Be aware that trying to retrieve an argument not present
in the syntax will result in a NullPointerException
.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
clear()
void
copy
(@NotNull CommandContext context) boolean
<T> T
<T> T
@NotNull String
@NotNull String
getInput()
getMap()
<T> T
getOrDefault
(@NotNull String identifier, T defaultValue) <T> T
getOrDefault
(@NotNull Argument<T> argument, T defaultValue) @Nullable CommandData
boolean
boolean
int
hashCode()
protected void
retrieveDefaultValues
(@Nullable Map<String, Supplier<Object>> defaultValuesMap) void
void
setReturnData
(@Nullable CommandData returnData)
-
Field Details
-
args
-
rawArgs
-
-
Constructor Details
-
CommandContext
-
-
Method Details