mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +03:00
[FEATURE] Support Debug client with memory type
This commit is contained in:
parent
fca2ed2447
commit
198ce95176
1 changed files with 19 additions and 17 deletions
|
@ -36,24 +36,26 @@ public void run(String[] args) {
|
||||||
if(mainClass == null) {
|
if(mainClass == null) {
|
||||||
throw new NullPointerException("Add `-Dlauncher.runtime.mainclass=YOUR_MAIN_CLASS` to jvmArgs");
|
throw new NullPointerException("Add `-Dlauncher.runtime.mainclass=YOUR_MAIN_CLASS` to jvmArgs");
|
||||||
}
|
}
|
||||||
if(accessToken != null) {
|
if(uuid == null) {
|
||||||
Request.setOAuth(authId, new AuthRequestEvent.OAuthRequestEvent(accessToken, refreshToken, expire));
|
if(accessToken != null) {
|
||||||
Request.RequestRestoreReport report = Request.restore(true, false);
|
Request.setOAuth(authId, new AuthRequestEvent.OAuthRequestEvent(accessToken, refreshToken, expire));
|
||||||
permissions = report.userInfo.permissions;
|
Request.RequestRestoreReport report = Request.restore(true, false);
|
||||||
username = report.userInfo.playerProfile.username;
|
permissions = report.userInfo.permissions;
|
||||||
uuid = report.userInfo.playerProfile.uuid.toString();
|
username = report.userInfo.playerProfile.username;
|
||||||
if(report.userInfo.accessToken != null) {
|
uuid = report.userInfo.playerProfile.uuid.toString();
|
||||||
minecraftAccessToken = report.userInfo.accessToken;
|
if(report.userInfo.accessToken != null) {
|
||||||
|
minecraftAccessToken = report.userInfo.accessToken;
|
||||||
|
}
|
||||||
|
} else if(password != null) {
|
||||||
|
AuthRequest request = new AuthRequest(login, password, authId, AuthRequest.ConnectTypes.API);
|
||||||
|
AuthRequestEvent event = request.request();
|
||||||
|
Request.setOAuth(authId, event.oauth);
|
||||||
|
if(event.accessToken != null) {
|
||||||
|
minecraftAccessToken = event.accessToken;
|
||||||
|
}
|
||||||
|
username = event.playerProfile.username;
|
||||||
|
uuid = event.playerProfile.uuid.toString();
|
||||||
}
|
}
|
||||||
} else if(password != null) {
|
|
||||||
AuthRequest request = new AuthRequest(login, password, authId, AuthRequest.ConnectTypes.API);
|
|
||||||
AuthRequestEvent event = request.request();
|
|
||||||
Request.setOAuth(authId, event.oauth);
|
|
||||||
if(event.accessToken != null) {
|
|
||||||
minecraftAccessToken = event.accessToken;
|
|
||||||
}
|
|
||||||
username = event.playerProfile.username;
|
|
||||||
uuid = event.playerProfile.uuid.toString();
|
|
||||||
}
|
}
|
||||||
if(profileUUID != null) {
|
if(profileUUID != null) {
|
||||||
UUID profileUuid = UUID.fromString(profileUUID);
|
UUID profileUuid = UUID.fromString(profileUUID);
|
||||||
|
|
Loading…
Reference in a new issue