tutorial:commands
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
tutorial:commands [2019/08/13 15:02] – Add line numbers to code, clarify issue with redirects. Add another Command example i509vcb | tutorial:commands [2019/08/22 03:55] – [A very basic command] Change ArgumentBuilders to CommandManager i509vcb | ||
---|---|---|---|
Line 35: | Line 35: | ||
<code java [enable_line_numbers=" | <code java [enable_line_numbers=" | ||
// The root of the command. This must be a literal argument. | // The root of the command. This must be a literal argument. | ||
- | dispatcher.register(LiteralArgumentBuilder.literal(" | + | dispatcher.register(CommandManager.literal(" |
// Then add an argument named bar that is an integer | // Then add an argument named bar that is an integer | ||
- | .then(RequiredArgumentBuilder.argument(" | + | .then(CommandManager.argument(" |
// The command to be executed if the command " | // The command to be executed if the command " | ||
.executes(ctx -> { | .executes(ctx -> { |
tutorial/commands.txt · Last modified: 2024/02/23 14:22 by allen1210