Lock offline mode support behind insertion of at least one Minecraft account

Co-Authored-By: Naomi Calabretta <tony0000.ac@gmail.com>
This commit is contained in:
bexnoss 2022-01-17 12:27:48 +01:00 committed by Naomi Calabretta
parent 9d23ac562f
commit e0a04c5031

View File

@ -156,6 +156,19 @@ void AccountListPage::on_actionAddMicrosoft_triggered()
void AccountListPage::on_actionAddOffline_triggered()
{
if (!m_accounts->anyAccountIsValid()) {
QMessageBox::warning(
this,
tr("Error"),
tr(
"You must add a Microsoft or Mojang account that owns Minecraft before you can add an offline account."
"<br><br>"
"If you have lost your account you can contact Microsoft for support."
)
);
return;
}
MinecraftAccountPtr account = OfflineLoginDialog::newAccount(
this,
tr("Please enter your desired username to add your offline account.")