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 [2020/05/16 01:57] – Reword some parts of the tutorial, includes a few gramatical corrections i509vcb | tutorial:commands [2020/06/14 01:12] – Reword static imports section i509vcb | ||
---|---|---|---|
Line 83: | Line 83: | ||
==== Static Imports ==== | ==== Static Imports ==== | ||
- | You could do the long method of typing | + | You could type out '' |
- | This also works for getting | + | This also works for Minecraft' |
- | This also works for Minecraft' | + | |
And your imports would look something like this: | And your imports would look something like this: | ||
<code java [enable_line_numbers=" | <code java [enable_line_numbers=" | ||
- | import static com.mojang.brigadier.arguments.StringArgumentType.getString; | + | // getString(ctx, |
- | import static com.mojang.brigadier.arguments.StringArgumentType.word; | + | import static com.mojang.brigadier.arguments.StringArgumentType.getString; |
- | import static net.minecraft.server.command.CommandManager.literal; | + | // word() |
- | import static net.minecraft.server.command.CommandManager.argument; | + | import static com.mojang.brigadier.arguments.StringArgumentType.word; |
- | import static net.minecraft.server.command.CommandManager.*; | + | // literal(" |
+ | import static net.minecraft.server.command.CommandManager.literal; | ||
+ | // argument("bar", word()) | ||
+ | import static net.minecraft.server.command.CommandManager.argument; | ||
+ | // Import everything | ||
+ | import static net.minecraft.server.command.CommandManager.*; | ||
</ | </ | ||
- | Note: Please be sure you use the '' | + | Note: Please be sure you use the '' |
- | Brigadier' | + | Brigadier' |
- | Minecraft' | + | Minecraft' |
+ | CommandManager is in '' | ||
==== Suggestions ==== | ==== Suggestions ==== |
tutorial/commands.txt · Last modified: 2024/02/23 14:22 by allen1210