From 5811ac1a7ebac456813f82a2bae901a8218e44f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Troch?= Date: Sat, 26 Jul 2025 12:16:31 +0200 Subject: [PATCH 1/3] NOISSUE Restore valid account check when starting instance --- launcher/LaunchController.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/launcher/LaunchController.cpp b/launcher/LaunchController.cpp index e77082c78..32056887e 100644 --- a/launcher/LaunchController.cpp +++ b/launcher/LaunchController.cpp @@ -51,9 +51,18 @@ void LaunchController::decideAccount() return; } - // Find an account to use. + // Find a valid account to use. auto accounts = APPLICATION->accounts(); - if (accounts->count() <= 0) + bool hasAValidAccount = false; + for (int i = 0; i < accounts.get()->count(); i++) { + auto currentAccount = accounts.get()->at(i); + if (currentAccount.isAccount && currentAccount.account != nullptr) { + hasAValidAccount = true; + break; + } + } + + if (!hasAValidAccount) { // Tell the user they need to log in at least one account in order to play. auto reply = CustomMessageBox::selectable( From 1865e95af4c7308f9867d7525e8aeb63e6b94664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Troch?= Date: Sat, 26 Jul 2025 12:17:17 +0200 Subject: [PATCH 2/3] NOISSUE Update "no accounts" message box text Add a missing space and remove "Mojang account" since these are no longer supported. --- launcher/LaunchController.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/launcher/LaunchController.cpp b/launcher/LaunchController.cpp index 32056887e..be341215a 100644 --- a/launcher/LaunchController.cpp +++ b/launcher/LaunchController.cpp @@ -68,8 +68,8 @@ void LaunchController::decideAccount() auto reply = CustomMessageBox::selectable( m_parentWidget, tr("No Accounts"), - tr("In order to play Minecraft, you must have at least one Mojang or Minecraft " - "account logged in." + tr("In order to play Minecraft, you must have at least one Minecraft account " + "logged in. " "Would you like to open the account manager to add an account now?"), QMessageBox::Information, QMessageBox::Yes | QMessageBox::No From ab7fd532abf4aaa025810c57d02f6933b08acdee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Troch?= Date: Sat, 26 Jul 2025 12:19:59 +0200 Subject: [PATCH 3/3] NOISSUE Fix incorrect accounts dialog being shown when clicking "yes" on the "no valid account" message box --- launcher/LaunchController.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/LaunchController.cpp b/launcher/LaunchController.cpp index be341215a..0d6c68607 100644 --- a/launcher/LaunchController.cpp +++ b/launcher/LaunchController.cpp @@ -78,7 +78,7 @@ void LaunchController::decideAccount() if (reply == QMessageBox::Yes) { // Open the account manager. - APPLICATION->ShowGlobalSettings(m_parentWidget, "accounts"); + APPLICATION->ShowAccountsDialog(m_parentWidget); } }