From ab5a81282bc36628cd570c1d55e290d807baacf5 Mon Sep 17 00:00:00 2001 From: Bixilon Date: Wed, 17 May 2023 18:51:45 +0200 Subject: [PATCH] doc: link to headless mode documentation --- ReadMe.md | 1 + doc/Headless.md | 64 +++++++++++++++++++ .../terminal/commands/AccountManageCommand.kt | 2 +- 3 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 doc/Headless.md diff --git a/ReadMe.md b/ReadMe.md index 5a25e9c43..3e4e1c58e 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -24,6 +24,7 @@ Minosoft is an open source minecraft client, written from scratch in kotlin (and - Multiple profiles (i.e. settings for servers or minosoft in general) - Modding - Independent, I will probably accept almost all patches +- [Headless mode](/doc/Headless.md) - Way more stuff (some ~~technical~~ explanation about the render system is [here](/doc/rendering/ReadMe.md)). You can find information about the architecture design [here](/doc/Architecture.md) diff --git a/doc/Headless.md b/doc/Headless.md new file mode 100644 index 000000000..4c941e8ac --- /dev/null +++ b/doc/Headless.md @@ -0,0 +1,64 @@ +# Headless + +Minosoft has two gui modules, the main gui (so called eros) and the rendering. +You can turn off both individually from each other. + +## Start arguments + +### Eros + +To disable eros, just add `--disable_eros` as start argument + +### Rendering + +To disable rendering, just add `--disable_rendering` as start argument. + +## Disable all gui + +To disable all gui components you can also just add `--headless` as argument. +If present, eros and rendering will be disabled. + +## Auto connect + +You can then (also if running with gui) use the `--auto_connect` argument to connect to servers automatically. + +The argument takes up to 3 parameters, split by comma: + +| Index | Comment | +|-------|--------------------------------------------------------------------------------------| +| 0 | Server address as string (required) | +| 1 | Enforced version (optional, can be `automatic`) | +| 2 | Account uuid (optional, currently selected account in eros will be used as fallback) | + +Example: `java -jar Minosoft.jar --auto_connect=hypixel.net,1.19.4,9e6ce7c5-40d3-483e-8e5a-b6350987d65f` + +## CLI + +Minosoft features a command line shell, that can be used to manage it. Auto complete is available everywhere. It can also be accessed in the normal chat (starting with a dot `.`) + +### Account + +- `account add microsoft` +- `account list` +- `account list @[type=minosoft:microsoft_account]` + +### Ping + +- `ping hypixel.net` +- `ping hypixel.net 1.8.9` + +### Connect + +- `connect hypixel.net 1.19.4` + +### Connection + +- `connection list` +- `connection disconnect @` +- `connection select 1` (The current selected connection is used for connection specific other commands) + +### Say + +- `say Moritz is the best developer ever!` + +There are even more commands, those are just examples. diff --git a/src/main/java/de/bixilon/minosoft/terminal/commands/AccountManageCommand.kt b/src/main/java/de/bixilon/minosoft/terminal/commands/AccountManageCommand.kt index 329f3c85a..8cc79fd64 100644 --- a/src/main/java/de/bixilon/minosoft/terminal/commands/AccountManageCommand.kt +++ b/src/main/java/de/bixilon/minosoft/terminal/commands/AccountManageCommand.kt @@ -67,7 +67,7 @@ object AccountManageCommand : Command { stack.print.print("Obtaining device code...") DefaultThreadPool += { MicrosoftOAuthUtils.obtainDeviceCodeAsync({ - stack.print.print("Please open §e${it.verificationURI}§r and enter the following code §e${it.userCode}§r and login into your microsoft account.") + stack.print.print("Please open §e${it.verificationURI}§r and enter the code §e${it.userCode}§r and login into your microsoft account.") }, { it.printStackTrace() }, { stack.print.print("Logging in into microsoft account...") val account = MicrosoftOAuthUtils.loginToMicrosoftAccount(it)