diff --git a/launcher/minecraft/auth/AccountData.cpp b/launcher/minecraft/auth/AccountData.cpp index 8b0ac18a4..65aa8cf81 100644 --- a/launcher/minecraft/auth/AccountData.cpp +++ b/launcher/minecraft/auth/AccountData.cpp @@ -290,8 +290,6 @@ bool AccountData::resumeStateFromV3(QJsonObject data) bool needsElyByMigration = false; if (typeS == "MSA") { type = AccountType::MSA; - } else if (typeS == "Mojang") { - type = AccountType::Mojang; } else if (typeS == "AuthlibInjector") { type = AccountType::AuthlibInjector; } else if (typeS == "Elyby") { @@ -305,11 +303,6 @@ bool AccountData::resumeStateFromV3(QJsonObject data) return false; } - if (type == AccountType::Mojang) { - legacy = data.value("legacy").toBool(false); - canMigrateToMSA = data.value("canMigrateToMSA").toBool(false); - } - if (type == AccountType::AuthlibInjector) { if (needsElyByMigration) { customAuthServerUrl = "https://authserver.ely.by/api/authlib-injector/authserver"; @@ -369,14 +362,6 @@ QJsonObject AccountData::saveState() const tokenToJSONV3(output, mojangservicesToken, "xrp-mc"); } else if (type == AccountType::Offline) { output["type"] = "Offline"; - } else if (type == AccountType::Mojang) { - if (legacy) { - output["legacy"] = true; - } - if (canMigrateToMSA) { - output["canMigrateToMSA"] = true; - } - output["type"] = "Mojang"; } else if (type == AccountType::AuthlibInjector) { output["type"] = "AuthlibInjector"; output["customAuthServerUrl"] = customAuthServerUrl; @@ -463,7 +448,7 @@ QString AccountData::accessToken() const QString AccountData::clientToken() const { - if (type != AccountType::Mojang && type != AccountType::AuthlibInjector) { + if (type != AccountType::AuthlibInjector) { return QString(); } return yggdrasilToken.extra["clientToken"].toString(); @@ -471,7 +456,7 @@ QString AccountData::clientToken() const void AccountData::setClientToken(QString clientToken) { - if (type != AccountType::Mojang && type != AccountType::AuthlibInjector) { + if (type != AccountType::AuthlibInjector) { return; } yggdrasilToken.extra["clientToken"] = clientToken; @@ -487,7 +472,7 @@ void AccountData::generateClientTokenIfMissing() void AccountData::invalidateClientToken() { - if (type != AccountType::Mojang && type != AccountType::AuthlibInjector) { + if (type != AccountType::AuthlibInjector) { return; } yggdrasilToken.extra["clientToken"] = QUuid::createUuid().toString().remove(QRegularExpression("[{-}]")); @@ -510,7 +495,6 @@ QString AccountData::profileName() const QString AccountData::accountDisplayString() const { switch (type) { - case AccountType::Mojang: case AccountType::AuthlibInjector: { return userName(); } diff --git a/launcher/minecraft/auth/AccountData.h b/launcher/minecraft/auth/AccountData.h index 3ae23c30f..a0b0a17f2 100644 --- a/launcher/minecraft/auth/AccountData.h +++ b/launcher/minecraft/auth/AccountData.h @@ -88,7 +88,7 @@ struct MinecraftProfile { Validity validity = Validity::None; }; -enum class AccountType { MSA, Mojang, AuthlibInjector, Offline }; +enum class AccountType { MSA, AuthlibInjector, Offline }; enum class AccountState { Unchecked, Offline, Working, Online, Disabled, Errored, Expired, Gone }; @@ -104,13 +104,13 @@ struct AccountData { QString servicesServerUrl() const; QString authlibInjectorUrl() const; - //! userName for Mojang accounts, gamertag for MSA + //! userName for authlib-injector accounts, gamertag for MSA QString accountDisplayString() const; - //! Only valid for Mojang accounts. MSA does not preserve this information + //! Only valid for authlib-injector accounts. MSA does not preserve this information QString userName() const; - //! Only valid for Mojang accounts. + //! Only valid for authlib-injector accounts. QString clientToken() const; void setClientToken(QString clientToken); void invalidateClientToken(); @@ -125,8 +125,6 @@ struct AccountData { QString lastError() const; AccountType type = AccountType::MSA; - bool legacy = false; - bool canMigrateToMSA = false; QString customAuthServerUrl; QString customAccountServerUrl; diff --git a/launcher/minecraft/auth/AccountList.cpp b/launcher/minecraft/auth/AccountList.cpp index d72b529de..9eb455ba5 100644 --- a/launcher/minecraft/auth/AccountList.cpp +++ b/launcher/minecraft/auth/AccountList.cpp @@ -336,17 +336,6 @@ QVariant AccountList::data(const QModelIndex& index, int role) const return account->authlibInjectorUrl(); } - case MigrationColumn: { - if (account->accountType() != AccountType::Mojang) { - return tr("N/A", "Can Migrate"); - } - if (account->canMigrate()) { - return tr("Yes", "Can Migrate"); - } else { - return tr("No", "Can Migrate"); - } - } - default: return QVariant(); } diff --git a/launcher/minecraft/auth/AccountList.h b/launcher/minecraft/auth/AccountList.h index 0c4901203..222718157 100644 --- a/launcher/minecraft/auth/AccountList.h +++ b/launcher/minecraft/auth/AccountList.h @@ -56,7 +56,6 @@ class AccountList : public QAbstractListModel { // TODO: Add icon column. ProfileNameColumn = 0, NameColumn, - MigrationColumn, TypeColumn, StatusColumn, AuthServerColumn, diff --git a/launcher/minecraft/auth/MinecraftAccount.h b/launcher/minecraft/auth/MinecraftAccount.h index d1889dfb2..515a9d43c 100644 --- a/launcher/minecraft/auth/MinecraftAccount.h +++ b/launcher/minecraft/auth/MinecraftAccount.h @@ -131,8 +131,6 @@ class MinecraftAccount : public QObject, public Usable { bool isActive() const; - bool canMigrate() const { return data.canMigrateToMSA; } - [[nodiscard]] AccountType accountType() const noexcept { return data.type; } bool ownsMinecraft() const { return data.type != AccountType::Offline && data.minecraftEntitlement.ownsMinecraft; } @@ -142,12 +140,6 @@ class MinecraftAccount : public QObject, public Usable { QString typeDisplayName() const { switch (data.type) { - case AccountType::Mojang: { - if (data.legacy) { - return tr("Legacy", "Account type"); - } - return tr("Mojang", "Account type"); - } break; case AccountType::AuthlibInjector: { return tr("authlib-injector", "Account type"); } break; @@ -166,12 +158,6 @@ class MinecraftAccount : public QObject, public Usable { QString typeString() const { switch (data.type) { - case AccountType::Mojang: { - if (data.legacy) { - return "legacy"; - } - return "mojang"; - } break; case AccountType::AuthlibInjector: { // This typeString gets passed to Minecraft; any Yggdrasil // account should have the "mojang" type regardless of which diff --git a/launcher/settings/INIFile.cpp b/launcher/settings/INIFile.cpp index e97741f20..2c7620e65 100644 --- a/launcher/settings/INIFile.cpp +++ b/launcher/settings/INIFile.cpp @@ -39,7 +39,6 @@ #include #include -#include #include #include #include