Ошибка вместо краша при CheckServerRequest

Для полноценного исправления проблемы на Forge/Sponge 1.12 ужно заменить launchwrapper на патченый
This commit is contained in:
Gravit 2018-09-24 21:55:03 +07:00
parent 526742b375
commit 6df0863f1e

View file

@ -5,6 +5,7 @@
import ru.gravit.launcher.LauncherAPI;
import ru.gravit.launcher.LauncherConfig;
import ru.gravit.launcher.client.ClientLauncher;
import ru.gravit.utils.helper.LogHelper;
import ru.gravit.utils.helper.VerifyHelper;
import ru.gravit.launcher.profiles.PlayerProfile;
import ru.gravit.launcher.request.Request;
@ -38,7 +39,12 @@ public Integer getType() {
protected PlayerProfile requestDo(HInput input, HOutput output) throws IOException {
output.writeString(username, SerializeLimits.MAX_LOGIN);
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();
// Read response