User Tools

Site Tools


tutorial:commands

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tutorial:commands [2019/11/16 17:01] – Line numbers i509vcbtutorial:commands [2024/02/23 14:22] (current) – Documenting and first draft allen1210
Line 1: Line 1:
 +Licensing: The code in this article is licensed under the "Creative Commons Zero v1.0 Universal" license. The license grants you the rights to use the code examples shown in this article in your own mods.
 +
 ====== Creating Commands ====== ====== Creating Commands ======
  
-Creating commands can allow a mod developer to add functionality that a player can use through a command.  +Creating commands can allow a mod developer to add functionality that can used through a command. This tutorial will teach you how to register commands, and the general command structure of Brigadier.
-This tutorial will teach you how to register commands, and the command structure of Brigadier along with some more advanced commands structures.+
  
-===== Registering Commands =====+===== What is Brigadier? =====
  
-If you just want to see how to register commands you've come to the right place here.+Brigadier is a command parser & dispatcher written by Mojang for use in Minecraft. Brigadier is a tree based command library where you build a tree of arguments and commands.
  
-Registering commands is done through ''CommandRegistry'' with the ''register'' method.+The source code for brigadier can be found here: https://github.com/Mojang/brigadier
  
-The ''register'' method specifies two arguments, the dedicated flag and a consumer representing the ''CommandDispatcher''. These methods should be placed in your mod's initializer.+===== The ''Command'' interface =====
  
-The dedicated flag if set to true will tell Fabric to only register the command on a ''DedicatedServer'' (if false than the command will register on both the ''InternalServer'' and ''DedicatedServer'').+In Minecraft, ''com.mojang.brigadier.Command'' is a functional interface, which runs some specific things, and throw a ''CommandSyntaxException'' in some cases. It has a generic type ''S'', which defines the type of the //command source//. The command source provides some context in which a command was ran. In Minecraft, the command source is typically a ''<yarn class_2168>'' which can represent a server, a command block, rcon connection, a player or an entity. In some cases, it can also be a ''<yarn class_637>''.
  
-Below are few examples of how the commands can be registered.+The single method in ''Command'', ''run(CommandContext<S>)'' takes ''CommandContext<S>'' as the sole parameter and returns an integer. The command context holds your command source of ''S'' and allows you to obtain arguments, look at the parsed command nodes and see the input used in this command.
  
-<code java [enable_line_numbers="true"]> +Like other functional interfacesit is usually used as lambda or a method reference:
-CommandRegistry.INSTANCE.register(falsedispatcher -> TutorialCommands.register(dispatcher)); // All commands are registered in single class that references every command. +
-  +
-CommandRegistry.INSTANCE.register(false, dispatcher -> { // You can also just reference every single class also. There is also the alternative of just using CommandRegistry +
-    TutorialCommand.register(dispatcher); +
-    TutorialHelpCommand.register(dispatcher); +
-}); +
-  +
-CommandRegistry.INSTANCE.register(true, dispatcher -> { // Or directly registering the command to the dispatcher. +
- dispatcher.register(LiteralArgumentBuilder.literal("tutorial").executes(ctx -> execute(ctx))); +
-}); +
-</code>+
  
-==== A very basic command ==== +<code java> 
- +Command<ServerCommandSource> command = context -> { 
-Wait isn't this the exact same command from the Brigadier tutorial? Well yes it is but it is here to help explain the structure of a command. +    return 0
- +};
-<code java [enable_line_numbers="true"]+
-// The root of the command. This must be a literal argument. +
-dispatcher.register(CommandManager.literal("foo")  +
-// Then add an argument named bar that is an integer +
-    .then(CommandManager.argument("bar", integer()) +
- // The command to be executed if the command "foo" is entered with the argument "bar" +
-        .executes(ctx -> {  +
-            System.out.println("Bar is " + IntArgumentType.getInteger(ctx, "bar")); +
-     // Return a result. -1 is failure, 0 is a pass and 1 is success. +
-            return 1; +
-            })) +
-    // The command "foo" to execute if there are no arguments. +
-    .executes(ctx -> {  +
-        System.out.println("Called foo with no arguments"); +
-        return 1+
-    }+
-);+
 </code> </code>
  
-The main process registers the command "foo" (Root Node) with an optional argument of "bar" (Child node).  +The integer can be considered the result of the command. Typically negative values mean a command has failed and will do nothing. A result of ''0'' means the command has passed. Positive values mean the command was successful and did something.
-Since the root node must be literal, The sender must enter the exact same sequence of letters to execute the command, so "Foo", "fOo" or "fooo" will not execute the command.+
  
-===== Brigadier Explained ===== 
  
-Brigadier starts with the ''CommandDispatcher'' which should be thought more as a tree rather than a list of methods.  +==== What can the ServerCommandSource do? ====
-The trunk of the tree is the CommandDispatcher.  +
-The register(LiteralArgumentBuilder) methods specify the beginning of branches with the following then methods specifying the shape of length of the branches.  +
-The executes blocks can be seen at the leaves of the tree where it ends and also supplies the outcome of the system.+
  
-The execute blocks specify the command to be ran. As Brigadier's Command is FunctionalInterface you can use lambdas to specify commands.+''ServerCommandSource'' provides some additional implementation specific context when command is run. This includes the ability to get the entity that executed the command, the world the command was ran in or the server the command was run on.
  
-==== CommandContexts ====+<code java [enable_line_numbers="true"]> 
 +// Get the source. This will always work. 
 +final ServerCommandSource source ctx.getSource(); 
  
-When a command is ranBrigadier provides a CommandContext to the command that is ran.  +// Uncheckedmay be null if the sender was the console or the command block
-The CommandContext contains all arguments and other objects such as the inputted String and the ''Command Source'' (ServerCommandSource in Minecraft's implementation).+final @Nullable Entity sender = source.getEntity()
  
-==== Arguments ====+// Will throw an exception if the executor of the command was not an Entity.  
 +// The result of this could contain a player. Also will send feedback telling the sender of the command that they must be an entity.  
 +// This method will require your methods to throw a CommandSyntaxException.  
 +// The entity options in ServerCommandSource could return a CommandBlock entity, any living entity or a player. 
 +final @NotNull Entity sender2 source.getEntityOrThrow(); 
  
-The arguments in Brigadier both parse and error check any inputted arguments.  +// null if the executor of the command is not player. 
-Minecraft creates some special arguments for it's own use such as the ''EntityArgumentType'' which represents the in-game entity selectors ''@a@r, @p, @e[type=!player, limit=1, distance=..2]'', or an ''NBTTagArgumentType'' that parses NBT and verifies that the input is the correct syntax.+final @Nullable ServerPlayerEntity player = source.getPlayer():
  
-You could do the long method of typing ''CommandManager.literal("foo")'' and it would work, but you can statically import the arguments and shorten that to ''literal("foo")''.  +// Will throw an exception if the executor of the command was not explicitly a Player. 
-This also works for getting arguments, which shortens the already long ''StringArgumentType.getString(ctx, "string")'' to ''getString(ctx, "string")''+// Also will send feedback telling the sender of the command that they must be a player
-This also works for Minecraft's arguments.+// This method will require your methods to throw a CommandSyntaxException
 +final @NotNull ServerPlayerEntity player = source.getPlayerOrThrow(); 
  
-And your imports would look something like this: +// Gets the sender's position as a Vec3d when the command was sent. 
-<code java [enable_line_numbers="true"]> +// This could be the location of the entity/command block or in the case of the consolethe world's spawn point
-import static com.mojang.brigadier.arguments.StringArgumentType.getString; // getString(ctx, "string") +final Vec3d position = source.getPosition(); 
-import static com.mojang.brigadier.arguments.StringArgumentType.word; // word()string(), greedyString() +
-import static net.minecraft.server.command.CommandManager.literal; // literal("foo") +
-import static net.minecraft.server.command.CommandManager.argument; // argument("bar", word()+
-import static net.minecraft.server.command.CommandManager.*// Import everything +
-</code>+
  
-Brigadier's default arguments are located in ''com.mojang.brigadier.arguments''+// Gets the world the sender is within. The console'world is the same as the default spawn world. 
 +final ServerWorld world = source.getWorld(); 
  
-Minecraft'arguments hide in ''net.minecraft.command.arguments'' and the CommandManager is at ''net.minecraft.server.command''+// Gets the sender'rotation as a Vec2f. 
 +final Vec2f rotation = source.getRotation(); 
  
-==== Suggestions ====+// Access to the instance of the MinecraftServer this command was ran on. 
 +final MinecraftServer server source.getServer(); 
  
-Suggestions can be provided to the client to recommend what to input into the command.  This is used for Scoreboards and Loot Tables ingame. The game stores these in the SuggestionProviders. A few examples of Minecraft's built in suggestions providers are below +// The name of the command source. This could be the name of the entity, player, 
-<code> +// the name of a CommandBlock that has been renamed before being placed down, or in the case of the Console, "Console"
-SUMMONABLE_ENTITIES +final String name = source.getName(); 
-AVAILIBLE_SOUNDS +
-ALL_RECIPES +
-ASK_SERVER +
-</code>+
  
-Loot tables specify their own SuggestionProvider inside LootCommand for example. +// Returns true if the source of the command has a certain permission level
- +// This is based on the operator status of the sender
-The example below is a dynamically changing SuggestionProvider that lists several words for a StringArgumentType to demonstrate how it works: +// (On an integrated server, the player must have cheats enabled to execute these commands.) 
-<code java [enable_line_numbers="true"]> +final boolean b = source.hasPermissionLevel(int level); 
-public static SuggestionProvider<ServerCommandSource> suggestedStrings() { +
-    return (ctx, builder) -> getSuggestionsBuilder(builder, /*Access to a list here*/); +
-+
-     +
-private static CompletableFuture<Suggestions> getSuggestionsBuilder(SuggestionsBuilder builder, List<String> list) { +
-    String remaining = builder.getRemaining().toLowerCase(Locale.ROOT); +
-         +
-    if(list.isEmpty()) { // If the list is empty then return no suggestions +
-        return Suggestions.empty(); // No suggestions +
-    } +
-         +
-    for (String str : list) { // Iterate through the supplied list +
-        if (str.toLowerCase(Locale.ROOT).startsWith(remaining)) { +
-            builder.suggest(str); // Add every single entry to suggestions list+
-        } +
-    } +
-    return builder.buildFuture(); // Create the CompletableFuture containing all the suggestions +
-}+
 </code> </code>
  
-The SuggestionProvider is a FunctionalInterface that returns a CompletableFuture containing a list of suggestions. These suggestions are given to client as a command is typed and can be changed while server is running. The SuggestionProvider provides a CommandContext and a SuggestionBuilder to determine all the suggestions. The CommandSource can also be taken into account during the suggestion creation process as it is available through the CommandContext.+===== Register basic command =====
  
-Though remember these are suggestions. The inputted command may not contain an argument you suggested so you still have to parse check inside the command to see if the argument is what you want if it's a String for example and parsers may still throw exceptions if an invalid syntax is inputted.+Commands are registered by registering in ''CommandRegistrationCallback'' in the Fabric API. For information on registering callbacks, please see the [[callbacks]].
  
-To use the suggestion you would append it right after the argument you want to recommend arguments for. This can be any argument and the normal client side exception popups will still workNote this cannot be applied to literals.+The event should be registered in your mod's initializer. The callback has three parameters. The ''CommmandDispatcher<S>'' is used to register, parse and execute commands. ''S'' is the type of command source the command dispatcher supports, which is usually ''ServerCommandSource''The second parameter provides an abstraction to registries which may be passed to certain command argument methods. The third parameter is a ''RegistrationEnvironment'' which identifies the type of server the commands are being registered on.
  
-<code java [enable_line_numbers="true"]+To simplify the code, it is highly recommended to ''static import'' the methods in ''CommandManager'' (see [[#Static Imports]]): 
-argument(argumentName, word()) +<code java> 
-.suggests(CompletionProviders.suggestedStrings()) +import static net.minecraft.server.command.CommandManager.*;
-    .then(/*Rest of the command*/));+
 </code> </code>
  
-==== Requires ==== +In the mod initializer, we just register the simplest command:
- +
-Lets say you have a command you only want operators to be able to execute. This is where the ''requires'' method comes into play. The requires method has one argument of a Predicate<ServerCommandSource> which will supply a ServerCommandSource to test with and determine if the CommandSource can execute the command+
- +
-For example this may look like the following:+
  
 <code java [enable_line_numbers="true"]> <code java [enable_line_numbers="true"]>
-dispatcher.register(literal("foo"+public class ExampleMod implements ModInitializer { 
- .requires(source -> source.hasPermissionLevel(4)) +  @Override 
- .executes(ctx -> { +  public void onInitialize() { 
- ctx.getSource().sendFeedback(new LiteralText("You are an operator", false)); +    CommandRegistrationCallback.EVENT.register((dispatcher, registryAccess, environment) -> dispatcher.register(literal("foo"
- return 1; +        .executes(context -> 
- }); +      // For versions below 1.19, replace "Text.literal" with "new LiteralText"
-</code>+      // For versions below 1.20, remode "(->" directly. 
 +      context.getSource().sendFeedback(() -> Text.literal("Called /foo with no arguments"), false);
  
-This command will only execute if the Source of the command is a level 4 operator at minimum. If the predicate returns false, then the command will not execute. Also this has the side effect of not showing this command in tab completion to anyone who is not a level 4 operator. +      return 1
- +    }))); 
-==== Exceptions ==== +  } 
- +}
-Brigadier supports command exceptions which can be used to end a command such as if an argument didn't parse properly or the command failed to execute.  +
- +
-All the exceptions from Brigadier are based on the CommandSyntaxException. The two main types of exceptions Brigadier provides are Dynamic and Simple exception types, of which you must ''create()'' the exception to throw it. These exceptions also allow you to specify the context in which the exception was thrown using ''createWithContext(ImmutableStringReader)''. Though this can only be used with a custom parser. These can be defined and thrown under certain scenarios during the command.  +
-Below is a coin flip command to show an example of exceptions in use. +
- +
-<code java [enable_line_numbers="true"]> +
-dispatcher.register(CommandManager.literal("coinflip"+
- .executes(ctx -> { +
- Random random = new Random(); +
-  +
- if(random.nextBoolean()) { // If heads succeed. +
- ctx.getSource().sendMessage(new TranslateableText("coin.flip.heads")) +
- return Command.SINGLE_SUCCESS+
- } +
- throw new SimpleCommandExceptionType(new TranslateableText("coin.flip.tails")).create(); // Oh no tails, you lose. +
- }));+
 </code> </code>
  
-Though you are not just limited to a single type of exception as Brigadier also supplies Dynamic exceptions.+**Please ensure you import the correct static method.** The method ''literal'' is ''CommandManager.literal''. You can also alternatively explicitly write ''CommandManager.literal'' instead of using static imports. ''CommandManager.literal("foo")'' tells brigadier this command has one node, a **literal** called ''foo''.
  
-<code java [enable_line_numbers="true"]> +In the ''sendFeedback'' method, the first parameter is the text to be sent, which is a ''Text'' in versions below 1.20, or a ''Supplier<Text>'' in 1.20 and above (this is used to avoid instantiating ''Text'' objects when not needed, so please do not use ''Suppliers.ofInstance'' or smiliar methods). The second parameter determines whether to broadcast the feedback to other operators. If the command is to //query// something without actually affecting the world, such as query the current time or some player's score, it should be ''false''. If the command actually //does// something, such as changing the time or modifying someone's score, it should be ''true''. If game rule ''sendCommandFeedback'' is false, you will not accept any feedback. If the sender is modifed through ''/execute as ...'', the feedback is sent to the original sender.
-DynamicCommandExceptionType used_name = new DynamicCommandExceptionType(name -> { +
- return new LiteralText("The name: " + (String) name + " has been used")+
-}); +
-</code>+
  
-There are more Dynamic exception types which each take a different amount of arguments into account (''Dynamic2CommandExceptionType'', ''Dynamic3CommandExceptionType''''Dynamic4CommandExceptionType'', ''DynamicNCommandExceptionType''). +If the command fails, instead of calling ''sendFeedback'', you may directly throw a ''CommandSyntaxException'' or ''<yarn class_2164>''See [[command_exceptions]] for details.
-You should remember that the Dynamic exceptions takes an object as an argument so you may have to cast the argument for your use.+
  
-==== Redirects (Aliases) ====+To execute this command, you must type ''/foo'', which is case-sensitive. If ''/Foo'', ''/FoO'', ''/FOO'', ''/fOO'' or ''/fooo'' is typed instead, the command will not run.
  
-Redirects are Brigadier's form of aliases. Below is how Minecraft handles /msg have an alias of /tell and /w. +===== Registration environment ===== 
 +If desired, you can also make sure a command is only registered under some specific circumstances, for example, only in the dedicated environment:
  
-<code java [enable_line_numbers="true"]> +<yarncode java [enable_line_numbers="true", highlight_lines_extra="5,6,7"]> 
-public static void register(CommandDispatcher<ServerCommandSource> dispatcher) +public class ExampleCommandMod implements ModInitializer 
-    LiteralCommandNode node = registerMain(dispatcher); // Registers main command +    @Override 
-    dispatcher.register(literal("tell"+    public void onInitialize() { 
- .redirect(node)); // Alias 1, redirect to main command +        CommandRegistrationCallback.EVENT.register((dispatcher, registryAccess, environment-> { 
-    dispatcher.register(literal("w") +            if (environment.field_25423{ 
- .redirect(node)); // Alias 2, redirect to main command+                ...; 
 +            } 
 +        }); 
 +    }
 } }
 +</yarncode>
  
-public static LiteralCommandNode registerMain(CommandDispatcher<ServerCommandSource> dispatcher) { +===== Static Imports ===== 
-    return dispatcher.register(literal("msg") +In the example above, the use of static imports is used for code simplifyingFor a literal this would shorten the statement to ''literal("foo")''This also works for getting the value of an argument. This shortens ''StringArgumentType.getString(ctx, "string")'' to ''getString(ctx, "string")''This also works for Minecraft's own argument types.
- .then(argument("targets", EntityArgumentType.players()) +
-     .then(argument("message", MessageArgumentType.message()) +
- .executes(ctx -> { +
-     return execute(ctx.getSource(), getPlayers(ctx, "targets"), getMessage(ctx, "message")); +
- })))); +
-+
-</code> +
- +
-The redirect registers a branch into the command tree, where the dispatcher is told when executing a redirected command to instead look on a different branch for more arguments and executes blocks. The literal argument that the redirect is placed on will also rename first literal on the targeted branch in the new command. +
- +
-Redirects do not work in shortened aliases such as ''/mod thing <argument>'' having an alias of ''/thing <argument>'' as Brigadier does not allow forwarding nodes with childrenThough you could use alternative methods to reduce the amount of duplicate code for this case. +
- +
-==== Redirects (Chainable Commands) ==== +
-Commands such as ''/execute as @e[type=player] in the_end run tp ~ ~ ~'' are possible because of redirectsBelow is an example of a chainable command:+
  
 +Below is an example of some static imports:
 <code java [enable_line_numbers="true"]> <code java [enable_line_numbers="true"]>
-LiteralCommandNode<ServerCommandSource> root = dispatcher.register(literal("fabric_test"))+// getString(ctx, "string") 
-LiteralCommandNode<ServerCommandSource> root1 = dispatcher.register(literal("fabric_test")  +import static com.mojang.brigadier.arguments.StringArgumentType.getString
-// You can register under the same literal more than once, it will just register new parts of the branch as shown below if you register a duplicate branch an error will popup in console warning of conflicting commands but one will still work. +// word() 
-    .then(literal("extra") +import static com.mojang.brigadier.arguments.StringArgumentType.word; 
-        .then(literal("long") + // literal("foo") 
-            .redirect(root)) // Return to root for chaining +import static net.minecraft.server.command.CommandManager.literal; 
-        .then(literal("short"+ // argument("bar", word()) 
-            .redirect(root))) // Return to root for chaining +import static net.minecraft.server.command.CommandManager.argument
-        .then(literal("command") +// Import everything in the CommandManager 
-            .executes(ctx -> { +import static net.minecraft.server.command.CommandManager.*;
-                ctx.getSource().sendFeedback(new LiteralText("Chainable Command"), false)+
-                return Command.SINGLE_SUCCESS; +
-})));+
 </code> </code>
-The redirect can also modify the CommandSource. 
  
-<code java [enable_line_numbers="true"]> +Note: Please be sure you use the ''literal'' and ''argument'' from ''CommandManager'' instead of other classesor you may have issues with generics when trying to compile, because the type parameter ''S'' should be ''ServerCommandSource''. (For client-side commands, use ''ClientCommandManager'' instead.)
-.redirect(rootNode(commandContext_1x) -> { +
-    return ((ServerCommandSource) commandContext_1x.getSource()).withLookingAt(Vec3ArgumentType.getVec3(commandContext_1x, "pos")); +
-}) +
-</code>+
  
-===== ServerCommandSource =====+Brigadier's default arguments are at ''com.mojang.brigadier.arguments''
  
-What if you wanted a command that the CommandSource must be an entity to execute? The ServerCommandSource provides this option with a couple of methods+Minecraft's arguments are in ''net.minecraft.command.arguments''. CommandManager is in the package ''net.minecraft.server.command''.
  
-<code java [enable_line_numbers="true"]> +===== Add Requirements =====
-ServerCommandSource source ctx.getSource();  +
-// Get the source. This will always work.+
  
-Entity sender = source.getEntity();  +Let's say you have a command that you only want operators to be able to execute. This is where the ''requires'' method comes into play. The ''requires'' method has one argument of a ''Predicate<ServerCommandSource>'' which will supply a ''ServerCommandSource'' to test with and determine if the ''CommandSource'' can execute the command.
-// Unchecked, may be null if the sender was the console.+
  
-Entity sender2 = source.getEntityOrThrow();  +For example this may look like the following:
-// Will end the command if the source of the command was not an Entity.  +
-// The result of this could contain a player. Also will send feedback telling the sender of the command that they must be an entity.  +
-// This method will require your methods to throw a CommandSyntaxException.  +
-// The entity options in ServerCommandSource could return a CommandBlock entity, any living entity or a player.+
  
-ServerPlayerEntity player source.getPlayer() +<code java [enable_line_numbers="true"]> 
-// Will end the command if the source of the command was not explicitly a PlayerAlso will send feedback telling the sender of the command that they must be a player.  This method will require your methods to throw a CommandSyntaxException+dispatcher.register(literal("foo"
 +  .requires(source -> source.hasPermissionLevel(2)) 
 +  .executes(ctx -> { 
 +    ctx.getSource().sendFeedback(() -> Text.literal("You are an operator"), false); 
 +    return 1; 
 +  });
 </code> </code>
  
-The ServerCommandSource also provides other information about the sender of the command.+This command will only execute if the source of the command is a level 2 operator at minimum, //including// command blocks. Otherwise, the command is not registered. Also this has the side effect of not showing this command in tab completion to anyone who is not a level 2 operator. This is also why you cannot tab-complete most commands when you did not enable cheating.
  
-<code java [enable_line_numbers="true"]> +To create commands that only level 4 operators (//not including// command blocks) can executeuse ''source.hasPermissionLevel(4)''.
-source.getPosition();  +
-// Get's the sender's position as a Vec3 when the command was sent. This could be the location of the entity/command block or in the case of the consolethe world's spawn point.+
  
-source.getWorld();  +===== Arguments =====
-// Get's the world the sender is within. The console's world is the same as the default spawn world.+
  
-source.getRotation();  +Arguments are used in most of commandsSometimes they can be optional, which means if you do not provide that argument, the command will also run. One node may have multiple argument types, but be aware that there is possibility of ambiguity, which should be avoided.
-// Get'the sender's rotation as a Vec2f.+
  
-source.getMinecraftServer();  +In this case, we add one integer argument, and calculate the square of the integer.
-// Access to the instance of the MinecraftServer this command was ran on.+
  
-source.getName() +<code java> 
-// The name of the command sourceThis could be the name of the entity, player, the name of a CommandBlock that has been renamed before being placed down or in the case of the Console, "Console+    dispatcher.register(literal("mul"
- +        .then(argument("value", IntegerArgumentType.integer()) 
-source.hasPermissionLevel(int level);  +            .executes(context -> { 
-// Returns true if the source of the command has a certain permission levelThis is based on the operator status of the sender. (On an integrated serverthe player must have cheats enabled to execute these commands)+              final int value = IntegerArgumentType.getInteger(context, "value"); 
 +              final int result = value * value; 
 +              context.getSource().sendFeedback(() -> Text.literal("%s × %s = %s".formatted(valuevalue, result)), false); 
 +              return result; 
 +            })));
 </code> </code>
  
-===== Some actual examples =====+In this case, after the word ''/mul'', you should type an integer. For example, if you run ''/mul 3'', you will get the feedback message "3 × 3 9". If you type ''/mul'' without arguments, the command cannot be correctly parsed.
  
-Just a few to show:+Notefor simplicity, ''IntegerArgumentType.integer'' and ''IntegerArgumentType.getInteger'' can be replaced with ''integer'' and ''getInteger'' with static import. This example does not use static imports, in order to be more explicit.
  
-=== Broadcast a message === +Then we add an optional second argument: 
- +<code java> 
-<code java [enable_line_numbers="true"] +    dispatcher.register(literal("mul") 
-public static void register(CommandDispatcher<ServerCommandSource> dispatcher){ +        .then(argument("value", IntegerArgumentType.integer()) 
-    dispatcher.register(literal("broadcast") +            .executes(context -> { 
- .requires(source -> source.hasPermissionLevel(2)) // Must be a game master to use the commandCommand will not show up in tab completion or execute to non op's or any op that is permission level 1+              final int value = IntegerArgumentType.getInteger(context, "value"); 
-     .then(argument("color", ColorArgumentType.color()) +              final int result = value * value; 
- .then(argument("message", greedyString()) +              context.getSource().sendFeedback(() -> Text.literal("%s × %s = %s".formatted(value, value, result)), false); 
-     .executes(ctx -> broadcast(ctx.getSource(), getColor(ctx, "color"), getString(ctx, "message")))))); // You can deal with the arguments out here and pipe them into the command. +              return result; 
-+            }) 
- +            .then(argument("value2", IntegerArgumentType.integer()) 
-public static int broadcast(ServerCommandSource source, Formatting formatting, String message) { +                .executes(context -> 
-    Text text new LiteralText(message).formatting(formatting)+                  final int value = IntegerArgumentType.getInteger(context, "value")
- +                  final int value2 = IntegerArgumentType.getInteger(context, "value2"); 
-    source.getMinecraftServer().getPlayerManager().broadcastChatMessage(text, false); +                  final int result value * value2
-    return Command.SINGLE_SUCCESS// Success +                  context.getSource().sendFeedback(() -> Text.literal("%s × %s = %s".formatted(value, value2, result)), false); 
-}+                  return result
 +                }))));
 </code> </code>
  
-=== /giveMeDiamond ===+Now you can type one or two integers. If you give one integer, that square of integer will be calculated. If you provide two integers, their product will be calculated. You may find it unnecessary to specify similar executions twice. Therefore, we can create a method that will be used in both executions.
  
-First the basic code where we register "giveMeDiamondas a literal and then an executes block to tell the dispatcher which method to run.+<code java> 
 +public class ExampleMod implements ModInitializer { 
 +  @Override 
 +  public void onInitialize() { 
 +    CommandRegistrationCallback.EVENT.register((dispatcher, registryAccess, environment) -> dispatcher.register(literal("mul"
 +        .then(argument("value", IntegerArgumentType.integer()) 
 +            .executes(context -> executeMultiply(IntegerArgumentType.getInteger(context, "value"), IntegerArgumentType.getInteger(context, "value"), context)) 
 +            .then(argument("value2", IntegerArgumentType.integer()) 
 +                .executes(context -> executeMultiply(IntegerArgumentType.getInteger(context, "value"), IntegerArgumentType.getInteger(context, "value2"), context)))))); 
 +  }
  
-<code java [enable_line_numbers="true"]> +  private static int executeMultiply(int value, int value2, CommandContext<ServerCommandSource> context) { 
-public static LiteralCommandNode register(CommandDispatcher<ServerCommandSource> dispatcher) { // You can also return a LiteralCommandNode for use with possible redirects +    final int result = value * value2; 
-    return dispatcher.register(literal("giveMeDiamond") +    context.getSource().sendFeedback(() -> Text.literal("%s × %s = %s".formatted(value, value2, result)), false); 
-        .executes(ctx -> giveDiamond(ctx)));+    return result; 
 +  }
 } }
 </code> </code>
 +===== A sub command =====
  
-Then since we only want to give to playerswe check if the CommandSource is a player. But we can use ''getPlayer'' and do both at the same time and throw an error if the source is not a player.+To add a sub commandyou register the first literal node of the command normally.
  
-<code java [enable_line_numbers="true"]+<code> 
-public static int giveDiamond(CommandContext<ServerCommandSource> ctx) throws CommandSyntaxException { +dispatcher.register(literal("foo"))
-    ServerCommandSource source = ctx.getSource()+
-  +
-    PlayerEntity self = source.getPlayer(); // If not a player than the command ends+
 </code> </code>
  
-Then we add to the player's inventory, with check to see if the inventory is full:+In order to have sub command, one needs to append the next node to the existing node. 
  
-<code java [enable_line_numbers="true"]> +This creates the command ''foo <bar>'' as shown below.
-    if(!player.inventory.insertStack(new ItemStack(Items.DIAMOND))){ +
-        throw new SimpleCommandExceptionType(new TranslateableText("inventory.isfull")).create(); +
-    }  +
-    return 1; +
-+
-</code> +
- +
-=== Antioch === +
-...lobbest thou thy Holy Hand Grenade of Antioch towards thy foe. +
-who being naughty in My sight, shall snuff it. +
- +
-Aside from the joke this command summons a primed TNT to a specified location or the location of the sender's cursor. +
- +
-First create an entry into the CommandDispatcher that takes a literal of antioch with an optional argument of the location to summon the entity at.+
  
 <code java [enable_line_numbers="true"]> <code java [enable_line_numbers="true"]>
-public static void register(CommandDispatcher<ServerCommandSource> dispatcher) { +dispatcher.register(literal("foo") 
-    dispatcher.register(literal("antioch") +    .then(literal("bar") 
-        .then(required("location", BlockPosArgumentType.blockPos(+        .executes(context -> 
-     .executes(ctx -> antioch(ctx.getSource(), BlockPosArgument.getBlockPos(ctx, "location"))))) +            // For versions below 1.19, use ''new LiteralText''
- .executes(ctx -> antioch(ctx.getSource(), null))); +            // For versions below 1.20, use directly the ''Text'' object instead of supplier. 
-+            context.getSource().sendFeedback(() -> Text.literal("Called foo with bar"), false);
-</code>+
  
-Then the creation and messages behind the joke. +            return 1; 
- +        }) 
-<code java [enable_line_numbers="true"]> +    ) 
-public static int antioch(ServerCommandSource source, BlockPos blockPos) throws CommandSyntaxException {  +);
-  +
-    if(blockPos==null) { +
-        blockPos = LocationUtil.calculateCursorOrThrow(source, source.getRotation()); // For the case of no inputted argument we calculate the cursor position of the player or throw an error if the nearest position is too far or is outside of the world. This class is used as an example and actually doesn't exist yet. +
-    } +
-  +
-    TntEntity tnt = new TntEntity(source.getWorld(), blockPos.getX(), blockPos.getY(), blockPos.getZ(), null); +
-         +
-    source.getMinecraftServer().getPlayerManager().broadcastChatMessage(new LiteralText("...lobbest thou thy Holy Hand Grenade of Antioch towards thy foe").formatting(Formatting.RED), false); +
-    source.getMinecraftServer().getPlayerManager().broadcastChatMessage(new LiteralText("who being naughty in My sight, shall snuff it.").formatting(Formatting.RED), false); +
-    source.getWorld().spawnEntity(tnt); +
-    return 1; +
-}+
 </code> </code>
  
-=== Finding Biomes via Command === +Similar to argumentssub command nodes can also be set optional. In the following case, both ''/foo'' and ''/foo bar'' will be valid.
- +
-This example shows examples of redirects, exceptionssuggestions and a tiny bit of text. Note this command when used works but can take a bit of time to work similarly to ''/locate''+
 <code java [enable_line_numbers="true"]> <code java [enable_line_numbers="true"]>
-public class CommandLocateBiome { +dispatcher.register(literal("foo") 
-    // First make method to register  +    .executes(context -> { 
-    public static void register(CommandDispatcher<ServerCommandSource> dispatcher) { +        context.getSource().sendFeedback(() -> Text.literal("Called foo without bar"), false);
-        LiteralCommandNode<ServerCommandSource> basenode = dispatcher.register(literal("findBiome") +
-                .then(argument("biome_identifier", identifier()).suggests(BiomeCompletionProvider.BIOMES) // We use Biome suggestions for identifier argument +
-                        .then(argument("distance", integer(0, 20000)) +
-                                .executes(ctx -> execute(ctx.getSource(), getIdentifier(ctx, "biome_identifier"), getInteger(ctx, "distance")))) +
-                        .executes(ctx -> execute(ctx.getSource(), getIdentifier(ctx, "biome_identifier"), 1000)))); +
-        // Register redirect +
-        dispatcher.register(literal("biome"+
-                .redirect(basenode)); +
-    } +
-    // Beginning of the method +
-    private static int execute(ServerCommandSource source, Identifier biomeId, int range) throws CommandSyntaxException +
-        Biome biome = Registry.BIOME.get(biomeId)+
-         +
-        if(biome == null) { // Since the argument is an Identifier we need to check if the identifier actually exists in the registry +
-            throw new SimpleCommandExceptionType(new TranslatableText("biome.not.exist", biomeId)).create(); +
-        } +
-         +
-        List<Biome> bio = new ArrayList<Biome>(); +
-        bio.add(biome); +
-         +
-        ServerWorld world = source.getWorld(); +
-         +
-        BiomeSource bsource = world.getChunkManager().getChunkGenerator().getBiomeSource(); +
-         +
-        BlockPos loc = new BlockPos(source.getPosition()); +
-        // Now here is the heaviest part of the method. +
-        BlockPos pos = bsource.locateBiome(loc.getX(), loc.getZ(), range, bio, new Random(world.getSeed())); +
-         +
-        // Since this method can return null if it failed to find a biome +
-        if(pos == null) { +
-            throw new SimpleCommandExceptionType(new TranslatableText("biome.notfound", biome.getTranslationKey())).create(); +
-        } +
-         +
-        int distance = MathHelper.floor(getDistance(loc.getX(), loc.getZ(), pos.getX(), pos.getZ())); +
-        // Popup text that can suggest commands. This is the exact same system that /locate uses. +
-        Text teleportButtonPopup = Texts.bracketed(new TranslatableText("chat.coordinates", new Object[] { pos.getX(), "~", pos.getZ()})).styled((style_1x) -> +
-            style_1x.setColor(Formatting.GREEN).setClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/tp @s + pos.getX() + " ~ " + pos.getZ())).setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new TranslatableText("chat.coordinates.tooltip", new Object[0]))); +
-        }); +
-         +
-        source.sendFeedback(new TranslatableText("commands.locate.success", new Object[] { new TranslatableText(Registry.BIOME.get(biomeId).getTranslationKey()), teleportButtonPopup, distance}), false); +
         return 1;         return 1;
-    } +    }) 
-    // Just a normal old 2d distance method. +    .then(literal("bar"
-    private static float getDistance(int int_1, int int_2, int int_3, int int_4{ +        .executes(context -> { 
-        int int_5 = int_3 int_1+            context.getSource().sendFeedback(() -> Text.literal("Called foo with bar"), false); 
-        int int_6 = int_4 - int_2;+            return 1
 +        }) 
 +    ) 
 +); 
 +</code> 
 +====== Advanced concepts ======
  
-        return MathHelper.sqrt((float) (int_5 * int_5 + int_6 * int_6)); +Below are links to the articles about more complex concepts used in brigadier.
-    } +
-     +
-    +
  
-    public static class BiomeCompletionProvider { +^ Page                                                           ^ Description                                                                     ^ 
-        // This provides suggestions of what biomes can be selectedSince this uses the registry, mods that add new biomes will work without modification+| [[command_exceptions  |Exceptions]]                 | Fail execution of a command with a descriptive message and in certain contexts|                                                                   
-        public static final SuggestionProvider<ServerCommandSource> BIOMES = SuggestionProviders.register(new Identifier("biomes"), (ctx, builder) -> { +| [[command_suggestions|Suggestions]]                | Suggesting command input for the client                                       | 
-            Registry.BIOME.getIds().stream().forEach(identifier -> builder.suggest(identifier.toString(), new TranslatableText(Registry.BIOME.get(identifier).getTranslationKey()))); +| [[command_redirects|Redirects]]   | Allow use of aliases or repeating elements to execute commands                                  | 
-            return builder.buildFuture(); +| [[command_argument_types|Custom Argument Types]]    | Parse your own arguments into your own objects                                | 
-        }); +| [[command_examples|Examples]] | Some example commands |
-         +
-    } +
-</code>+
  
-===== Custom Arguments =====+====== FAQ ======
  
-Brigadier has support for custom argument types and this section goes into showing how to create a simple argument type. +===== Why does my code not compile =====
  
-Warning: Custom arguments require client mod installation to be registered correctly! If you are making a server plugin, consider using existing argument type and a custom suggestions provider instead.+There are several immediate possibilities for why this could occur.
  
-For this example we will create UUIDArgumentType.+  * **Catch or throw a CommandSyntaxException:** ''CommandSyntaxException'' is not a ''RuntimeException''. If you throw it, where it is throwed should be in methods that throws ''CommandSyntaxException'' in method signatures, or be caught. Brigadier will handle the checked exceptions and forward the proper error message in game for you. 
 +  * **Issues with generics:** You may have an issue with generics once in a while. If you are registering server command (which is most of the case), make sure you are using ''CommandManager.literal(...)'' or ''CommandManager.argument(...)'' instead of ''LiteralArgumentBuilder.literal'' or ''RequiredArgumentBuilder.argument'' in your static imports. 
 +  * **Check ''sendFeedback'' method:** You may have forgotten to provide a boolean as the second argument. Also remember that, since 1.20, the first parameter is ''Supplier<Text>'' instead of ''Text''
 +  * **''Command'' should return an integer:** When registering commands, the ''executes'' method accepts a ''Command'' object, which is usually lambda. The lambda should return an integer, instead of other types.
  
-First create a class which extends ''ArgumentType''. Note that ArgumentType is a generic, so the generic will define what type the ArgumentType will return+===== Can I register client side commands? =====
  
-<code java [enable_line_numbers="true"]> +Fabric has a ''ClientCommandManager'' that can be used to register client side commands. The code should exist only in client-side codes. Example:
-public class UUIDArgumentType implements ArgumentType<UUID>+
-</code>+
  
-ArgumentType requires you to implement the ''parse'' method, the type it returns will match with the Generic type. 
 <code java> <code java>
-@Override +    ClientCommandRegistrationCallback.EVENT.register((dispatcher, registryAccess-> dispatcher.register(ClientCommandManager.literal("foo_client"
-public UUID parse(StringReader readerthrows CommandSyntaxException {+        .executes(context -> { 
 +              context.getSource().sendFeedback(Text.literal("The command is executed in the client!")); 
 +              return 1; 
 +            } 
 +        )));
 </code> </code>
  
-This method is where all of your parsing will occur. Either this method will return the object based on the arguments provided in the command line or throw a CommandSyntaxException and parsing will fail.+If you need to open a screen in the client command execution, instead of directly calling ''client.setScreen(...)'', you should call ''%%client.execute(() -> client.setScreen(...))%%''. The variable ''client'' can be obtained with ''context.getSource().getClient()''.
  
-Next you will store the current position of the cursor, this is so you can substring out only the specific argument. This will always be at the beginning of where your argument appears on the command line.+===== Can I register commands in runtime? =====
  
-<code java [enable_line_numbers="true"]> +You can do this but it is not recommendedYou would get the ''CommandManager'' from the server and add anything commands you wish to it's ''CommandDispatcher''.
-int argBeginning = reader.getCursor(); // The starting position of the cursor is at the beginning of the argument. +
-if (!reader.canRead()) { +
-    reader.skip(); +
-+
-</code>+
  
-Now we grab the entire argument. Depending on your argument type, you may have a different criteria or be similar to some arguments where detecting a ''{'' on the command line will require it to be closed. For a UUID we will just figure out what cursor position the argument ends at.+After that you need to send the command tree to every player again using ''CommandManager.sendCommandTree(ServerPlayerEntity)''. This is required because the client locally caches the command tree it receives during login (or when operator packets are sent) for local completions rich error messages.
  
-<code java [enable_line_numbers="true"]> +===== Can I unregister commands in runtime? =====
-while (reader.canRead() && reader.peek() !' ') { // peek provides the character at the current cursor position. +
-    reader.skip(); // Tells the StringReader to move it's cursor to the next position. +
-+
-</code>+
  
-Then we will ask the StringReader what the current position of the cursor is an substring our argument out of the command line.+You can also do this, however it is much less stable than registering commands and could cause unwanted side effects. To keep things simple, you need to use reflection on brigadier and remove the nodes. After this, you need to send the command tree to every player again using ''sendCommandTree(ServerPlayerEntity)''. If you don't send the updated command tree, the client may think a command still exists, even though the server will fail execution.
  
-<code java [enable_line_numbers="true"]>String uuidString reader.getString().substring(argBeginningreader.getCursor());</code>+===== Can I execute command without typing in game? ===== 
 +Yes! You canBefore trying the next codetake note it works on Fabric 0.91.6+1.20.2 and it was not tested in other versions.
  
-Now finally we check if our argument is correct and parse the specific argument to our liking, and throwing an exception if the parsing fails.+Here is the code example
  
-<code java [enable_line_numbers="true"]> +<code java> 
-try { +    private void vanillaCommandByPlayer(World worldBlockPos posString command) { 
-    UUID uuid = UUID.fromString(uuidString); // Now our actual logic. +        PlayerEntity player world.getClosestPlayer(pos.getX(), pos.getY(), pos.getZ(), 5, false); 
-    return uuid; // And we return our typein this case the parser will consider this argument to have parsed properly and then move on. +        if (player != null) { 
-    } catch (Exception ex) { +            CommandManager commandManager = Objects.requireNonNull(player.getServer()).getCommandManager(); 
-    // UUIDs can throw an exception when made by a stringso we catch the exception and repackage it into a CommandSyntaxException type. +            ServerCommandSource commandSource player.getServer().getCommandSource(); 
-    // Create with context tells Brigadier to supply some context to tell the user where the command failed at. +            commandManager.executeWithPrefix(commandSource, command);
-    // Though normal create method could be used. +
-    throw new SimpleCommandExceptionType(new LiteralText(ex.getMessage())).createWithContext(reader); +
-+
-</code> +
- +
-The ArgumentType is done, however your client will refuse the parse the argument and throw an error. To fix this we need to register an ArgumentSerializer.  +
-Within your ModInitializer (Not only client or server) you will add this so the client can recognize the argument when the command tree is sent. For more complex argument types, you may need to create your own ArgumentSerializer. +
- +
-<code java [enable_line_numbers="true"]> +
-ArgumentTypes.register("mymod:uuid", UUIDArgumentType.class, new ConstantArgumentSerializer(UUIDArgumentType::uuid));  +
-// The argument should be what will create the ArgumentType. +
-</code> +
- +
-And here is the whole ArgumentType: +
- +
-<file java UUIDArgumentType.java [enable_line_numbers="true"]> +
- +
-import com.mojang.brigadier.StringReader; +
-import com.mojang.brigadier.arguments.ArgumentType; +
-import com.mojang.brigadier.context.CommandContext; +
-import com.mojang.brigadier.exceptions.CommandSyntaxException; +
-import com.mojang.brigadier.exceptions.SimpleCommandExceptionType; +
-import net.minecraft.text.LiteralText; +
-import net.minecraft.util.SystemUtil; +
- +
-import java.util.ArrayList; +
-import java.util.Collection; +
-import java.util.UUID; +
- +
-/** +
- * Represents an ArgumentType that will return a UUID. +
- */ +
-public class UUIDArgumentType implements ArgumentType<UUID> { // ArgumentType has a genericwhich is the return type of the +
-    // This method exists for convince and you could just initialize the class. +
-    public static UUIDArgumentType uuid() +
-        return new UUIDArgumentType(); +
-    } +
- +
-    // This is also for convince and you could always just grab the argument from the CommandContext. +
-    public static <S> UUID getUuid(String nameCommandContext<S> context) { +
-        // Note that you should assume the CommandSource wrapped inside of the CommandContext will always be a generic type. +
-        // If you access the ServerCommandSource make sure you verify the source is an instanceof ServerCommandSource before dangerous casting. +
-        return context.getArgument(name, UUID.class); +
-    } +
- +
-    private static final Collection<String> EXAMPLES = SystemUtil.consume(new ArrayList<>(), list -> { +
-        list.add("765e5d33-c991-454f-8775-b6a7a394c097"); // i509VCB: Username The_1_gamers +
-        list.add("069a79f4-44e9-4726-a5be-fca90e38aaf5"); // Notch +
-        list.add("61699b2e-d327-4a01-9f1e-0ea8c3f06bc6"); // Dinnerbone +
-    }); +
- +
-    @Override +
-    public UUID parse(StringReader reader) throws CommandSyntaxException { +
-        int argBeginning = reader.getCursor(); // The starting position of the cursor is at the beginning of the argument. +
-        if (!reader.canRead()) { +
-            reader.skip(); +
-        } +
- +
-        // Now we check the contents of the argument till either we hit the end of the command line (When canRead becomes false) +
-        // Otherwise we go till reach reach a space, which signifies the next argument +
-        while (reader.canRead() && reader.peek(!= ' ') { // peek provides the character at the current cursor position. +
-            reader.skip(); // Tells the StringReader to move it's cursor to the next position. +
-        } +
- +
-        // Now we substring the specific part we want to see using the starting cursor position and the ends where the next argument starts. +
-        String uuidString reader.getString().substring(argBeginning, reader.getCursor()); +
-        try { +
-            UUID uuid = UUID.fromString(uuidString); // Now our actual logic. +
-            return uuid; // And we return our typein this case the parser will consider this argument to have parsed properly and then move on. +
-        } catch (Exception ex) { +
-            // UUIDs can throw an exception when made by a string, so we catch the exception and repackage it into a CommandSyntaxException type. +
-            // Create with context tells Brigadier to supply some context to tell the user where the command failed at. +
-            // Though normal create method could be used. +
-            throw new SimpleCommandExceptionType(new LiteralText(ex.getMessage())).createWithContext(reader);+
         }         }
     }     }
- 
-    @Override 
-    public Collection<String> getExamples() { // Brigadier has support to show examples for what the argument should look like, this should contain a Collection of only the argument this type will return. 
-        return EXAMPLES; 
-    } 
-} 
-</file> 
-===== FAQ ===== 
- 
-=== What else can I send feedback to the CommandSource? === 
- 
-You can choose between Brigadier's default LiteralMessage or use any one of Minecraft's Text classes (LiteralText, TranslatableText) 
- 
-=== Why does my IDE complain saying that a method executed by my command needs to catch or throw a CommandSyntaxException === 
- 
-The solution to this is just to make the methods throw a CommandSyntaxException down the whole chain as the executes block handles the exceptions. 
- 
-=== Can I register commands in run time? === 
- 
-You can do this but it is not reccomended. You would get the instance of the CommandManager and add anything you wish to the CommandDispatcher within it. 
- 
-After that you will need to send the command tree to every player again using ''CommandManager.sendCommandTree(PlayerEntity)'' 
- 
-=== Can I unregister commands in run time? === 
- 
-You can also do this but it is very unstable and could cause unwanted side effects. Lets just say it involves a bunch of Reflection. 
- 
-Once again you will need to send the command tree to every player again using ''CommandManager.sendCommandTree(PlayerEntity)'' afterwards. 
- 
-=== Can I register client side commands? === 
- 
-Well Fabric currently doesn't support this natively but there is a mod by the Cotton team that adds this functionality where the commands do not run on the server and only on the client: 
-https://github.com/CottonMC/ClientCommands 
- 
-If you only want the command to only be visible on the integrated server like ''/publish'' then you would modify your requires block: 
- 
-<code java> 
-dispatcher.register(literal("publish") 
-    // The permission level 4 on integrated server is the equivalent of having cheats enabled. 
-    .requires(source -> source.getMinecraftServer().isSinglePlayer() && source.hasPermissionLevel(4))); 
 </code> </code>
  
-=== I want to access X from my mod when command is ran ===+First, you need CommandManager<ServerCommandSource>
 +Second, you need the ServerCommandSource. 
 +Then, u can call some CommandManager public methods like commandeManader.execute. (.execute need ParseResults<ServerCommandSource>
 +But commandeManader.executeWithPrefix allow you to use String. You can also put the slash (/).
  
-This is going to require a way to statically access your mod with a ''getInstance'' callBelow is a very simple instance system you can place in your mod +So... have fun!
- +
-<code java> +
-private static Type instance; +
- +
-static { // Static option on class initalize for seperate API class for example +
-   instance = new Type(); +
-+
- +
-public void onInitalize() { // If within your mod initalizer +
-   instance = this; +
-+
- +
-public static Type getInstance() { +
-    return instance; +
-+
-</code>+
tutorial/commands.1573923714.txt.gz · Last modified: 2019/11/16 17:01 by i509vcb