static void MinecraftClient_init_hook(MinecraftClient* minecraft) { MinecraftClient_init_real(minecraft); // add the command ServerCommandParser* commandParser = minecraft->getCommandParser(); // first argument: command name // second argument: how many params. e.g. "s" = one parameter, "ss" = two parameters // s stands for string; I guess there might be others? commandParser->addCommand("example", "s", exampleCommand); }
static void MinecraftClient$init_hook(MinecraftClient* client) { MinecraftClient$init_real(client); ServerCommandParser* commandParser = client->getCommandParser(); commandParser->addCommand("arrow", "ss", arrowCmd); }