diff --git a/docs/launcher-commands.md b/docs/launcher-commands.md index 5d46c10cd..66062de97 100644 --- a/docs/launcher-commands.md +++ b/docs/launcher-commands.md @@ -54,6 +54,7 @@ Start the client. - `--world`: Open or create this world (a folder under saves) at once - `--creative`: Creative mode for a new world - `--join`: Join a friend's world with its invite code +- `--server`: Join this server at once: an address, or a server of the list by name or position - `--arg`: An extra argument for the game, passed through as-is (repeatable), for example --server-thread MCP: `play`, then the `game_*` tools. @@ -373,6 +374,39 @@ Move a world to the system's trash. MCP: `worlds_delete`, needs `confirm: true`. +## `horizon-launcher multiplayer list` + +The servers of the game's Multiplayer screen (the default). + + horizon-launcher multiplayer list + +- `--instance`: The instance (default: the selected one) + +MCP: `multiplayer_list`. + +## `horizon-launcher multiplayer add` + +Add a server to the list. + + horizon-launcher multiplayer add
+ +- `ADDRESS`: Its address, as in the game's Add Server (host or host:port) +- `--name`: Its name in the list (default: Minecraft Server) +- `--instance` + +MCP: `multiplayer_add`. + +## `horizon-launcher multiplayer remove` + +Remove a server from the list: its position from 1, name or address. + + horizon-launcher multiplayer remove + +- `SERVER` +- `--instance` + +MCP: `multiplayer_remove`, needs `confirm: true`. + ## `horizon-launcher modpack list` The imported packs and their coverage (the default). diff --git a/launcher/Cargo.lock b/launcher/Cargo.lock index dbd21a37f..bace865b6 100644 --- a/launcher/Cargo.lock +++ b/launcher/Cargo.lock @@ -2734,6 +2734,7 @@ dependencies = [ name = "horizon-launcher" version = "0.2.0" dependencies = [ + "base64", "chrono", "clap", "dirs 5.0.1", diff --git a/launcher/Cargo.toml b/launcher/Cargo.toml index 57179380b..979a781d2 100644 --- a/launcher/Cargo.toml +++ b/launcher/Cargo.toml @@ -42,6 +42,7 @@ horizon-world = { path = "../crates/horizon-world" } # Deleting a world moves it to the system's trash trash = "5" # Backup names carry the local time, as vanilla's do +base64 = "0.22" chrono = { version = "0.4", default-features = false, features = ["clock"] } # The session file's random name. getrandom = "0.3" diff --git a/launcher/README.md b/launcher/README.md index 6a8fe7086..34b7c2317 100644 --- a/launcher/README.md +++ b/launcher/README.md @@ -86,6 +86,13 @@ The opening, then Play ([clip](docs/opening.webm)): (`_