mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-10-04 01:00:22 +00:00
NOISSUE Fix --world argument when launcher already running
This commit is contained in:
@@ -1197,6 +1197,7 @@ void Application::messageReceived(const QByteArray& message)
|
|||||||
{
|
{
|
||||||
QString id = received.args["id"];
|
QString id = received.args["id"];
|
||||||
QString server = received.args["server"];
|
QString server = received.args["server"];
|
||||||
|
QString world = received.args["world"];
|
||||||
QString profile = received.args["profile"];
|
QString profile = received.args["profile"];
|
||||||
bool offline = received.args["offline_enabled"] == "true";
|
bool offline = received.args["offline_enabled"] == "true";
|
||||||
QString offlineName = received.args["offline_name"];
|
QString offlineName = received.args["offline_name"];
|
||||||
@@ -1214,9 +1215,11 @@ void Application::messageReceived(const QByteArray& message)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QuickPlayTargetPtr serverObject = nullptr;
|
QuickPlayTargetPtr quickPlayTarget = nullptr;
|
||||||
if(!server.isEmpty()) {
|
if(!server.isEmpty()) {
|
||||||
serverObject = std::make_shared<QuickPlayTarget>(QuickPlayTarget::parseMultiplayer(server));
|
quickPlayTarget = std::make_shared<QuickPlayTarget>(QuickPlayTarget::parseMultiplayer(server));
|
||||||
|
} else if(!world.isEmpty()) {
|
||||||
|
quickPlayTarget = std::make_shared<QuickPlayTarget>(QuickPlayTarget::parseSingleplayer(world));
|
||||||
}
|
}
|
||||||
|
|
||||||
MinecraftAccountPtr accountObject;
|
MinecraftAccountPtr accountObject;
|
||||||
@@ -1232,7 +1235,7 @@ void Application::messageReceived(const QByteArray& message)
|
|||||||
instance,
|
instance,
|
||||||
!offline,
|
!offline,
|
||||||
nullptr,
|
nullptr,
|
||||||
serverObject,
|
quickPlayTarget,
|
||||||
accountObject,
|
accountObject,
|
||||||
offlineName
|
offlineName
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user