Add xuid to MinecraftAccount

This commit is contained in:
Duy Tran Khanh committed 2022-11-20 15:56:46 +07:00
1 parent 414a787f38
commit 5cfa1c33eb
3 files changed
+5 -7

No files matched your search

@@ -162,7 +162,7 @@ public final class Tools
varArgMap.put("auth_access_token", profile.accessToken);
varArgMap.put("auth_player_name", username);
varArgMap.put("auth_uuid", profile.profileId);
// varArgMap.put("auth_xuid", profile.profileId); // TODO!!!
varArgMap.put("auth_xuid", profile.xuid);
varArgMap.put("assets_root", Tools.ASSETS_PATH);
varArgMap.put("assets_index_name", versionInfo.assets);
varArgMap.put("clientid", profile.clientToken);
@@ -9,8 +9,7 @@ public class MinecraftAccount
public String clientToken = "0"; // clientID: refresh and invalidate
public String profileId = "00000000-0000-0000-0000-000000000000"; // authenticate UUID
public String username = "Steve";
public String selectedVersion = "1.7.10";
public String msaRefreshToken = "0";
public String xuid;
public String save(String outPath) throws IOException {
Tools.write(outPath, Tools.GLOBAL_GSON.toJson(this));
@@ -35,10 +34,8 @@ public class MinecraftAccount
acc.profileId = "0";
} if (acc.username == null) {
acc.username = "0";
} if (acc.selectedVersion == null) {
acc.selectedVersion = "1.7.10";
} if (acc.msaRefreshToken == null) {
acc.msaRefreshToken = "0";
} if (acc.xuid == null) {
acc.xuid = "0";
}
return acc;
}