GH-3012 add --offline and --name arguments

These allow launching offline with a specified name from the command line.
This commit is contained in:
Petr Mrázek
2022-06-09 23:46:28 +02:00
parent 8235752dec
commit c7256744c6
4 changed files with 99 additions and 36 deletions

View File

@@ -154,7 +154,8 @@ public slots:
bool online = true,
BaseProfilerFactory *profiler = nullptr,
MinecraftServerTargetPtr serverToJoin = nullptr,
MinecraftAccountPtr accountToUse = nullptr
MinecraftAccountPtr accountToUse = nullptr,
const QString &offlineName = QString()
);
bool kill(InstancePtr instance);
@@ -234,6 +235,8 @@ public:
QString m_instanceIdToLaunch;
QString m_serverToJoin;
QString m_profileToUse;
bool m_offline = false;
QString m_offlineName;
bool m_liveCheck = false;
QUrl m_zipToImport;
std::unique_ptr<QFile> logFile;