S
- the sender type.public interface Command<S>
Modifier and Type | Method and Description |
---|---|
@NotNull LiteralNode |
createCommandStructure()
Creates the command structure for this command.
|
boolean |
execute(S sender,
@NotNull String label,
@NotNull ArgumentHolder args)
Execute this command with the provided sender, label and arguments.
|
default @NotNull com.mojang.brigadier.exceptions.CommandSyntaxException |
syntaxException(@NotNull String message)
Helper method for creating
CommandSyntaxException s |
boolean execute(@NotNull S sender, @NotNull @NotNull String label, @NotNull @NotNull ArgumentHolder args) throws com.mojang.brigadier.exceptions.CommandSyntaxException
If the framework this command is being registered on doesn't give a label, the label specified is "unknown".
sender
- senderlabel
- labelargs
- argumentscom.mojang.brigadier.exceptions.CommandSyntaxException
@NotNull @NotNull LiteralNode createCommandStructure()
LiteralNode
@NotNull default @NotNull com.mojang.brigadier.exceptions.CommandSyntaxException syntaxException(@NotNull @NotNull String message)
CommandSyntaxException
smessage
- messageCopyright © 2020. All rights reserved.