From 391984b82da20da2fa1b095a489315903df45382 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 17 Jul 2025 10:03:18 +0000 Subject: [PATCH 1/7] Initial plan From 4b57e3190da2abd79b130b2f875b4514c185470b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 17 Jul 2025 10:18:58 +0000 Subject: [PATCH 2/7] Add quickPlayMultiplayer support to LaunchOptions and core library Co-authored-by: ci010 <8425057+ci010@users.noreply.github.com> --- xmcl-runtime-api/src/services/LaunchService.ts | 5 +++++ xmcl-runtime/launch/LaunchService.ts | 8 +------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/xmcl-runtime-api/src/services/LaunchService.ts b/xmcl-runtime-api/src/services/LaunchService.ts index 0c0203318..a44ffc320 100644 --- a/xmcl-runtime-api/src/services/LaunchService.ts +++ b/xmcl-runtime-api/src/services/LaunchService.ts @@ -53,6 +53,11 @@ export interface LaunchOptions { host: string port?: number } + /** + * Quick play multiplayer server for Minecraft 1.20+ + * Format: "server:port" or just "server" for default port 25565 + */ + quickPlayMultiplayer?: string /** * Support yushi's yggdrasil agent https://github.com/to2mbn/authlib-injector/wiki */ diff --git a/xmcl-runtime/launch/LaunchService.ts b/xmcl-runtime/launch/LaunchService.ts index 4af7b82eb..cb02e7d2b 100644 --- a/xmcl-runtime/launch/LaunchService.ts +++ b/xmcl-runtime/launch/LaunchService.ts @@ -208,6 +208,7 @@ export class LaunchService extends AbstractService implements ILaunchService { port: options.server.port, } : undefined, + quickPlayMultiplayer: options.quickPlayMultiplayer, extraExecOption: { shell: prepend && prepend.length > 0, detached: true, @@ -258,13 +259,6 @@ export class LaunchService extends AbstractService implements ILaunchService { } } - if (options.server) { - launchOptions.server = { - ip: options.server.host, - port: options.server?.port, - } - } - return launchOptions } From 5a85f33196013f5aabb0f5789bd3ba17b3b3717d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 17 Jul 2025 10:27:27 +0000 Subject: [PATCH 3/7] Complete quickPlayMultiplayer integration with UI and instance schema Co-authored-by: ci010 <8425057+ci010@users.noreply.github.com> --- xmcl-keystone-ui/locales/en.yaml | 2 ++ .../src/composables/instanceEdit.ts | 6 ++++++ .../src/views/BaseSettingServer.vue | 18 ++++++++++++++++++ .../src/entities/instance.schema.ts | 6 ++++++ xmcl-runtime-api/src/util/launch.ts | 1 + 5 files changed, 33 insertions(+) diff --git a/xmcl-keystone-ui/locales/en.yaml b/xmcl-keystone-ui/locales/en.yaml index c8652734d..9869c6f37 100644 --- a/xmcl-keystone-ui/locales/en.yaml +++ b/xmcl-keystone-ui/locales/en.yaml @@ -1310,6 +1310,8 @@ server: pings: Pings players: Players port: Port + quickPlayMultiplayer: Quick Play Multiplayer + quickPlayMultiplayerHint: Quick play server address for Minecraft 1.20+ (e.g., play.hypixel.net:25565) recommendedMinecraftVersion: Minecraft Version status: Server Status unknown: Unknown Server diff --git a/xmcl-keystone-ui/src/composables/instanceEdit.ts b/xmcl-keystone-ui/src/composables/instanceEdit.ts index 3366d4b0b..3245306c6 100644 --- a/xmcl-keystone-ui/src/composables/instanceEdit.ts +++ b/xmcl-keystone-ui/src/composables/instanceEdit.ts @@ -29,6 +29,7 @@ export function useInstanceEdit(instance: Ref, edit: (instance: EditIn host: '', // mc.hypixel.com port: '', // 25565 + quickPlayMultiplayer: '', // play.hypixel.net:25565 author: '', description: '', @@ -300,6 +301,7 @@ export function useInstanceEdit(instance: Ref, edit: (instance: EditIn description: data.description, env: data.env, resolution: data.resolution, + quickPlayMultiplayer: data.quickPlayMultiplayer || undefined, } as EditInstanceOptions if (instance.value.server) { payload.server = instance.value?.server @@ -329,6 +331,7 @@ export function useInstanceEdit(instance: Ref, edit: (instance: EditIn instancePath: instance.value?.path, author: data.author, description: data.description, + quickPlayMultiplayer: data.quickPlayMultiplayer || undefined, }) } else { await edit({ @@ -338,6 +341,7 @@ export function useInstanceEdit(instance: Ref, edit: (instance: EditIn host: data.host, port: Number.parseInt(data.port, 10), }, + quickPlayMultiplayer: data.quickPlayMultiplayer || undefined, }) } data.icon = instance.value?.icon @@ -374,6 +378,8 @@ export function useInstanceEdit(instance: Ref, edit: (instance: EditIn data.host = current.server.host data.port = current.server.port?.toString() || '' } + + data.quickPlayMultiplayer = current.quickPlayMultiplayer ?? '' data.maxMemory = current.maxMemory data.minMemory = current.minMemory diff --git a/xmcl-keystone-ui/src/views/BaseSettingServer.vue b/xmcl-keystone-ui/src/views/BaseSettingServer.vue index 3ee4a8f6b..64772846c 100644 --- a/xmcl-keystone-ui/src/views/BaseSettingServer.vue +++ b/xmcl-keystone-ui/src/views/BaseSettingServer.vue @@ -42,6 +42,24 @@ /> + + + + {{ t("server.quickPlayMultiplayer") }} + + + {{ t("server.quickPlayMultiplayerHint") }} + + + + + + diff --git a/xmcl-runtime-api/src/entities/instance.schema.ts b/xmcl-runtime-api/src/entities/instance.schema.ts index 0efbbfff4..eb101656a 100644 --- a/xmcl-runtime-api/src/entities/instance.schema.ts +++ b/xmcl-runtime-api/src/entities/instance.schema.ts @@ -186,6 +186,12 @@ export interface InstanceData { host: string port?: number } | null + /** + * Quick play multiplayer server for Minecraft 1.20+ + * Format: "server:port" or just "server" for default port 25565 + * @default "" + */ + quickPlayMultiplayer?: string /** * The custom tags on instance * @default [] diff --git a/xmcl-runtime-api/src/util/launch.ts b/xmcl-runtime-api/src/util/launch.ts index 231710990..4ba25f9ca 100644 --- a/xmcl-runtime-api/src/util/launch.ts +++ b/xmcl-runtime-api/src/util/launch.ts @@ -153,6 +153,7 @@ export async function generateLaunchOptionsWithGlobal( side, resolution: inst.resolution ?? globalResolution, server: inst.server ?? undefined, + quickPlayMultiplayer: inst.quickPlayMultiplayer ?? undefined, ...overrides, } return options From a931b7f1294289891802cb90ac7847208beb8319 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 17 Jul 2025 13:42:55 +0000 Subject: [PATCH 4/7] Address feedback: Remove quickPlayMultiplayer from instance schema, generate from server property Co-authored-by: ci010 <8425057+ci010@users.noreply.github.com> --- xmcl-keystone-ui/locales/en.yaml | 2 -- .../src/composables/instanceEdit.ts | 6 ------ .../src/views/BaseSettingServer.vue | 18 ------------------ .../src/entities/instance.schema.ts | 6 ------ xmcl-runtime-api/src/util/launch.ts | 2 +- xmcl-runtime/launch/LaunchService.ts | 7 +++++++ 6 files changed, 8 insertions(+), 33 deletions(-) diff --git a/xmcl-keystone-ui/locales/en.yaml b/xmcl-keystone-ui/locales/en.yaml index 9869c6f37..c8652734d 100644 --- a/xmcl-keystone-ui/locales/en.yaml +++ b/xmcl-keystone-ui/locales/en.yaml @@ -1310,8 +1310,6 @@ server: pings: Pings players: Players port: Port - quickPlayMultiplayer: Quick Play Multiplayer - quickPlayMultiplayerHint: Quick play server address for Minecraft 1.20+ (e.g., play.hypixel.net:25565) recommendedMinecraftVersion: Minecraft Version status: Server Status unknown: Unknown Server diff --git a/xmcl-keystone-ui/src/composables/instanceEdit.ts b/xmcl-keystone-ui/src/composables/instanceEdit.ts index 3245306c6..3366d4b0b 100644 --- a/xmcl-keystone-ui/src/composables/instanceEdit.ts +++ b/xmcl-keystone-ui/src/composables/instanceEdit.ts @@ -29,7 +29,6 @@ export function useInstanceEdit(instance: Ref, edit: (instance: EditIn host: '', // mc.hypixel.com port: '', // 25565 - quickPlayMultiplayer: '', // play.hypixel.net:25565 author: '', description: '', @@ -301,7 +300,6 @@ export function useInstanceEdit(instance: Ref, edit: (instance: EditIn description: data.description, env: data.env, resolution: data.resolution, - quickPlayMultiplayer: data.quickPlayMultiplayer || undefined, } as EditInstanceOptions if (instance.value.server) { payload.server = instance.value?.server @@ -331,7 +329,6 @@ export function useInstanceEdit(instance: Ref, edit: (instance: EditIn instancePath: instance.value?.path, author: data.author, description: data.description, - quickPlayMultiplayer: data.quickPlayMultiplayer || undefined, }) } else { await edit({ @@ -341,7 +338,6 @@ export function useInstanceEdit(instance: Ref, edit: (instance: EditIn host: data.host, port: Number.parseInt(data.port, 10), }, - quickPlayMultiplayer: data.quickPlayMultiplayer || undefined, }) } data.icon = instance.value?.icon @@ -378,8 +374,6 @@ export function useInstanceEdit(instance: Ref, edit: (instance: EditIn data.host = current.server.host data.port = current.server.port?.toString() || '' } - - data.quickPlayMultiplayer = current.quickPlayMultiplayer ?? '' data.maxMemory = current.maxMemory data.minMemory = current.minMemory diff --git a/xmcl-keystone-ui/src/views/BaseSettingServer.vue b/xmcl-keystone-ui/src/views/BaseSettingServer.vue index 64772846c..3ee4a8f6b 100644 --- a/xmcl-keystone-ui/src/views/BaseSettingServer.vue +++ b/xmcl-keystone-ui/src/views/BaseSettingServer.vue @@ -42,24 +42,6 @@ /> - - - - {{ t("server.quickPlayMultiplayer") }} - - - {{ t("server.quickPlayMultiplayerHint") }} - - - - - - diff --git a/xmcl-runtime-api/src/entities/instance.schema.ts b/xmcl-runtime-api/src/entities/instance.schema.ts index eb101656a..0efbbfff4 100644 --- a/xmcl-runtime-api/src/entities/instance.schema.ts +++ b/xmcl-runtime-api/src/entities/instance.schema.ts @@ -186,12 +186,6 @@ export interface InstanceData { host: string port?: number } | null - /** - * Quick play multiplayer server for Minecraft 1.20+ - * Format: "server:port" or just "server" for default port 25565 - * @default "" - */ - quickPlayMultiplayer?: string /** * The custom tags on instance * @default [] diff --git a/xmcl-runtime-api/src/util/launch.ts b/xmcl-runtime-api/src/util/launch.ts index 4ba25f9ca..0442ea6a1 100644 --- a/xmcl-runtime-api/src/util/launch.ts +++ b/xmcl-runtime-api/src/util/launch.ts @@ -153,7 +153,7 @@ export async function generateLaunchOptionsWithGlobal( side, resolution: inst.resolution ?? globalResolution, server: inst.server ?? undefined, - quickPlayMultiplayer: inst.quickPlayMultiplayer ?? undefined, + quickPlayMultiplayer: inst.server ? `${inst.server.host}${inst.server.port ? `:${inst.server.port}` : ''}` : undefined, ...overrides, } return options diff --git a/xmcl-runtime/launch/LaunchService.ts b/xmcl-runtime/launch/LaunchService.ts index cb02e7d2b..e067a2344 100644 --- a/xmcl-runtime/launch/LaunchService.ts +++ b/xmcl-runtime/launch/LaunchService.ts @@ -259,6 +259,13 @@ export class LaunchService extends AbstractService implements ILaunchService { } } + if (options.server) { + launchOptions.server = { + ip: options.server.host, + port: options.server?.port, + } + } + return launchOptions } From 21430c4341bdb803c1ead1d73fc3effa67c0a3f4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 17 Jul 2025 16:48:38 +0000 Subject: [PATCH 5/7] Move quickPlayMultiplayer logic from launch utility to LaunchService Co-authored-by: ci010 <8425057+ci010@users.noreply.github.com> --- xmcl-runtime-api/src/util/launch.ts | 1 - xmcl-runtime/launch/LaunchService.ts | 16 +++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/xmcl-runtime-api/src/util/launch.ts b/xmcl-runtime-api/src/util/launch.ts index 0442ea6a1..231710990 100644 --- a/xmcl-runtime-api/src/util/launch.ts +++ b/xmcl-runtime-api/src/util/launch.ts @@ -153,7 +153,6 @@ export async function generateLaunchOptionsWithGlobal( side, resolution: inst.resolution ?? globalResolution, server: inst.server ?? undefined, - quickPlayMultiplayer: inst.server ? `${inst.server.host}${inst.server.port ? `:${inst.server.port}` : ''}` : undefined, ...overrides, } return options diff --git a/xmcl-runtime/launch/LaunchService.ts b/xmcl-runtime/launch/LaunchService.ts index e067a2344..68c91e1f2 100644 --- a/xmcl-runtime/launch/LaunchService.ts +++ b/xmcl-runtime/launch/LaunchService.ts @@ -202,13 +202,6 @@ export class LaunchService extends AbstractService implements ILaunchService { minMemory, maxMemory, version, - server: options.server - ? { - ip: options.server.host, - port: options.server.port, - } - : undefined, - quickPlayMultiplayer: options.quickPlayMultiplayer, extraExecOption: { shell: prepend && prepend.length > 0, detached: true, @@ -264,6 +257,15 @@ export class LaunchService extends AbstractService implements ILaunchService { ip: options.server.host, port: options.server?.port, } + // Generate quickPlayMultiplayer from server property if not explicitly provided + if (!options.quickPlayMultiplayer) { + launchOptions.quickPlayMultiplayer = `${options.server.host}${options.server.port ? `:${options.server.port}` : ''}` + } + } + + // Handle direct quickPlayMultiplayer option + if (options.quickPlayMultiplayer) { + launchOptions.quickPlayMultiplayer = options.quickPlayMultiplayer } return launchOptions From 85a3663e269b2115e1d0dfe28a280049b6396fd3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 17 Jul 2025 16:59:57 +0000 Subject: [PATCH 6/7] Address feedback: restore server options, remove quickPlayMultiplayer from interface, use options.server to generate Co-authored-by: ci010 <8425057+ci010@users.noreply.github.com> --- xmcl-runtime-api/src/services/LaunchService.ts | 5 ----- xmcl-runtime/launch/LaunchService.ts | 16 +++++++--------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/xmcl-runtime-api/src/services/LaunchService.ts b/xmcl-runtime-api/src/services/LaunchService.ts index a44ffc320..0c0203318 100644 --- a/xmcl-runtime-api/src/services/LaunchService.ts +++ b/xmcl-runtime-api/src/services/LaunchService.ts @@ -53,11 +53,6 @@ export interface LaunchOptions { host: string port?: number } - /** - * Quick play multiplayer server for Minecraft 1.20+ - * Format: "server:port" or just "server" for default port 25565 - */ - quickPlayMultiplayer?: string /** * Support yushi's yggdrasil agent https://github.com/to2mbn/authlib-injector/wiki */ diff --git a/xmcl-runtime/launch/LaunchService.ts b/xmcl-runtime/launch/LaunchService.ts index 68c91e1f2..dd0aad4ae 100644 --- a/xmcl-runtime/launch/LaunchService.ts +++ b/xmcl-runtime/launch/LaunchService.ts @@ -202,6 +202,12 @@ export class LaunchService extends AbstractService implements ILaunchService { minMemory, maxMemory, version, + server: options.server + ? { + ip: options.server.host, + port: options.server.port, + } + : undefined, extraExecOption: { shell: prepend && prepend.length > 0, detached: true, @@ -257,15 +263,7 @@ export class LaunchService extends AbstractService implements ILaunchService { ip: options.server.host, port: options.server?.port, } - // Generate quickPlayMultiplayer from server property if not explicitly provided - if (!options.quickPlayMultiplayer) { - launchOptions.quickPlayMultiplayer = `${options.server.host}${options.server.port ? `:${options.server.port}` : ''}` - } - } - - // Handle direct quickPlayMultiplayer option - if (options.quickPlayMultiplayer) { - launchOptions.quickPlayMultiplayer = options.quickPlayMultiplayer + launchOptions.quickPlayMultiplayer = `${options.server.host}${options.server.port ? `:${options.server.port}` : ''}` } return launchOptions From ad25f69fd1d4ab6a301a8067e948bc2dafa9b431 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 17 Jul 2025 17:30:01 +0000 Subject: [PATCH 7/7] Update xmcl submodule to latest master branch Co-authored-by: ci010 <8425057+ci010@users.noreply.github.com> --- xmcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmcl b/xmcl index 461a5d92f..f1cb1d5b8 160000 --- a/xmcl +++ b/xmcl @@ -1 +1 @@ -Subproject commit 461a5d92f45865742d53c9b6230dccc02ad8b274 +Subproject commit f1cb1d5b871e05ce72f40b534a46c01ae8959b6a