Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions xmcl-runtime-api/src/services/LaunchService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed quickPlayMultiplayer property from the LaunchService interface. (85a3663)

/**
* Support yushi's yggdrasil agent https://github.com/to2mbn/authlib-injector/wiki
*/
Expand Down
1 change: 1 addition & 0 deletions xmcl-runtime-api/src/util/launch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ 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,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this logic to LaunchServer.ts. You don't need to add an extra prop to here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Moved the quickPlayMultiplayer logic from launch utility to LaunchService.ts where the server handling is processed. The logic now generates quickPlayMultiplayer from the server property when not explicitly provided, and handles direct quickPlayMultiplayer options. (21430c4)

...overrides,
}
return options
Expand Down
1 change: 1 addition & 0 deletions xmcl-runtime/launch/LaunchService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading