mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +03:00
Ошибка вместо краша при CheckServerRequest
Для полноценного исправления проблемы на Forge/Sponge 1.12 ужно заменить launchwrapper на патченый
This commit is contained in:
parent
526742b375
commit
6df0863f1e
1 changed files with 7 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
import ru.gravit.launcher.LauncherAPI;
|
||||||
import ru.gravit.launcher.LauncherConfig;
|
import ru.gravit.launcher.LauncherConfig;
|
||||||
import ru.gravit.launcher.client.ClientLauncher;
|
import ru.gravit.launcher.client.ClientLauncher;
|
||||||
|
import ru.gravit.utils.helper.LogHelper;
|
||||||
import ru.gravit.utils.helper.VerifyHelper;
|
import ru.gravit.utils.helper.VerifyHelper;
|
||||||
import ru.gravit.launcher.profiles.PlayerProfile;
|
import ru.gravit.launcher.profiles.PlayerProfile;
|
||||||
import ru.gravit.launcher.request.Request;
|
import ru.gravit.launcher.request.Request;
|
||||||
|
@ -38,7 +39,12 @@ public Integer getType() {
|
||||||
protected PlayerProfile requestDo(HInput input, HOutput output) throws IOException {
|
protected PlayerProfile requestDo(HInput input, HOutput output) throws IOException {
|
||||||
output.writeString(username, SerializeLimits.MAX_LOGIN);
|
output.writeString(username, SerializeLimits.MAX_LOGIN);
|
||||||
output.writeASCII(serverID, SerializeLimits.MAX_SERVERID); // 1 char for minus sign
|
output.writeASCII(serverID, SerializeLimits.MAX_SERVERID); // 1 char for minus sign
|
||||||
output.writeString(ClientLauncher.profile.getTitle(), SerializeLimits.MAX_CLIENT);
|
if(ClientLauncher.profile == null) {
|
||||||
|
LogHelper.error("Profile is null. Title is not net.");
|
||||||
|
output.writeString("", SerializeLimits.MAX_CLIENT);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
output.writeString(ClientLauncher.profile.getTitle(), SerializeLimits.MAX_CLIENT);
|
||||||
output.flush();
|
output.flush();
|
||||||
|
|
||||||
// Read response
|
// Read response
|
||||||
|
|
Loading…
Reference in a new issue