From 89ac58256cf1ac39b127335fc33658d6ae45478a Mon Sep 17 00:00:00 2001 From: arthomnix Date: Mon, 10 Apr 2023 21:14:12 +0100 Subject: [PATCH] NOISSUE Fix --world argument when launcher already running --- launcher/Application.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/launcher/Application.cpp b/launcher/Application.cpp index 318b59f6..27815720 100644 --- a/launcher/Application.cpp +++ b/launcher/Application.cpp @@ -1197,6 +1197,7 @@ void Application::messageReceived(const QByteArray& message) { QString id = received.args["id"]; QString server = received.args["server"]; + QString world = received.args["world"]; QString profile = received.args["profile"]; bool offline = received.args["offline_enabled"] == "true"; QString offlineName = received.args["offline_name"]; @@ -1214,9 +1215,11 @@ void Application::messageReceived(const QByteArray& message) return; } - QuickPlayTargetPtr serverObject = nullptr; + QuickPlayTargetPtr quickPlayTarget = nullptr; if(!server.isEmpty()) { - serverObject = std::make_shared(QuickPlayTarget::parseMultiplayer(server)); + quickPlayTarget = std::make_shared(QuickPlayTarget::parseMultiplayer(server)); + } else if(!world.isEmpty()) { + quickPlayTarget = std::make_shared(QuickPlayTarget::parseSingleplayer(world)); } MinecraftAccountPtr accountObject; @@ -1232,7 +1235,7 @@ void Application::messageReceived(const QByteArray& message) instance, !offline, nullptr, - serverObject, + quickPlayTarget, accountObject, offlineName );