@@ -0,0 +1,3014 @@
+package com.ptsmods.morecommands.commands.client;%0A%0Aimport com.mojang.brigadier.CommandDispatcher;%0Aimport com.mojang.brigadier.builder.LiteralArgumentBuilder;%0Aimport com.ptsmods.morecommands.MoreCommands;%0Aimport com.ptsmods.morecommands.MoreCommandsClient;%0Aimport com.ptsmods.morecommands.api.IMoreGameRules;%0Aimport com.ptsmods.morecommands.api.clientoptions.ClientOption;%0Aimport com.ptsmods.morecommands.miscellaneous.ClientCommand;%0Aimport net.minecraft.client.network.ClientCommandSource;%0Aimport net.minecraft.util.Util;%0A%0Aimport java.util.Locale;%0A%0Apublic class DocsCommand extends ClientCommand %7B%0A    @Override%0A    public void cRegister(CommandDispatcher%3CClientCommandSource%3E dispatcher) throws Exception %7B%0A        LiteralArgumentBuilder%3CClientCommandSource%3E clientCommand = cLiteral(%22clientcommand%22);%0A        MoreCommandsClient.getNodes().forEach((cmd, nodes) -%3E nodes.forEach(node -%3E clientCommand%0A                .then(cLiteral(node.getName())%0A                        .executes(ctx -%3E open(%22/commands%22 + (cmd.getDocsPath().startsWith(%22/%22) ? %22%22 : %22/%22) + cmd.getDocsPath())))));%0A%0A        LiteralArgumentBuilder%3CClientCommandSource%3E command = cLiteral(%22command%22);%0A        MoreCommands.getNodes().forEach((cmd, nodes) -%3E nodes.forEach(node -%3E command%0A                .then(cLiteral(node.getName())%0A                        .executes(ctx -%3E open(%22/commands%22 + (cmd.getDocsPath().startsWith(%22/%22) ? %22%22 : %22/%22) + cmd.getDocsPath())))));%0A%0A        LiteralArgumentBuilder%3CClientCommandSource%3E gamerule = cLiteral(%22gamerule%22);%0A        IMoreGameRules.get().allRules().forEach((name, key) -%3E gamerule%0A                .then(cLiteral(name)%0A                        .executes(ctx -%3E open(%22/gamerules/%22 + hyphenCase(name)))));%0A%0A        LiteralArgumentBuilder%3CClientCommandSource%3E clientOption = cLiteral(%22clientoption%22);%0A        ClientOption.getKeyMappedOptions().forEach((key, option) -%3E clientOption%0A                .then(cLiteral(key)%0A                        .executes(ctx -%3E open(%22/client-options/%22 + option.getName().toLowerCase(Locale.ROOT).replace(' ', '-')))));%0A%0A        dispatcher.register(cLiteral(%22mcdocs%22)%0A                .then(clientCommand)%0A                .then(command)%0A                .then(gamerule)%0A                .then(clientOption));%0A    %7D%0A%0A    @Override%0A    public String getDocsPath() %7B%0A        return %22/client/docs%22;%0A    %7D%0A%0A    @Override%0A    public boolean doLateInit() %7B%0A        // This has to be registered after all commands have been registered.%0A        return true;%0A    %7D%0A%0A    private static int open(String path) %7B%0A        Util.getOperatingSystem().open(%22https://morecommands.ptsmods.com%22 + (path.startsWith(%22/%22) ? %22%22 : %22/%22) + path);%0A        return 1;%0A    %7D%0A%0A    private static String hyphenCase(String camelCase) %7B%0A        StringBuilder sb = new StringBuilder();%0A        for (char c : camelCase.toCharArray()) %7B%0A            if (Character.isUpperCase(c))%0A                sb.append('-').append(Character.toLowerCase(c));%0A            else sb.append(c);%0A        %7D%0A%0A        return sb.toString();%0A    %7D%0A%7D%0A

Add docs command