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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidclear()voidcopy(@NotNull CommandContext context) boolean<T> T<T> T@NotNull String@NotNull StringgetInput()getMap()<T> TgetOrDefault(@NotNull String identifier, T defaultValue) <T> TgetOrDefault(@NotNull Argument<T> argument, T defaultValue) @Nullable CommandDatabooleanbooleaninthashCode()protected voidretrieveDefaultValues(@Nullable Map<String, Supplier<Object>> defaultValuesMap) voidvoidsetReturnData(@Nullable CommandData returnData)
-
Field Details
-
args
-
rawArgs
-
-
Constructor Details
-
CommandContext
-
-
Method Details