Package eu.sculkpowered.server.command
Interface CommandHandler
public interface CommandHandler
Handles the registration and execution of commands.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
execute
(@NotNull CommandSource source, @NotNull String command) Executes the command as the specifiedCommandSource
.@NotNull CommandHandler
register
(@NotNull com.mojang.brigadier.tree.LiteralCommandNode<CommandSource> node) Registers the command.
-
Method Details
-
register
@NotNull @NotNull CommandHandler register(@NotNull @NotNull com.mojang.brigadier.tree.LiteralCommandNode<CommandSource> node) Registers the command.- Parameters:
node
- the command node to register- Returns:
- this command handler
- Since:
- 1.0.0
-
execute
Executes the command as the specifiedCommandSource
.- Parameters:
source
- the source of the commandcommand
- the command to run- Since:
- 1.0.0
-