mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 09:01:08 +03:00
[FIX] getType to getLegacyType
This commit is contained in:
parent
c1711d39d3
commit
40fe55a46d
18 changed files with 21 additions and 20 deletions
|
@ -21,7 +21,7 @@ public CustomRequest(LauncherConfig config) {
|
||||||
public abstract String getName();
|
public abstract String getName();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final Integer getType() {
|
public final Integer getLegacyType() {
|
||||||
return 255;
|
return 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ public PingRequest(LauncherConfig config) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer getType() {
|
public Integer getLegacyType() {
|
||||||
return RequestType.PING.getNumber();
|
return RequestType.PING.getNumber();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ protected Request(LauncherConfig config) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
@LauncherAPI
|
||||||
public abstract Integer getType();
|
public abstract Integer getLegacyType();
|
||||||
|
|
||||||
@LauncherAPI
|
@LauncherAPI
|
||||||
protected final void readError(HInput input) throws IOException {
|
protected final void readError(HInput input) throws IOException {
|
||||||
|
@ -81,7 +81,7 @@ private void writeHandshake(HInput input, HOutput output) throws IOException {
|
||||||
output.writeInt(Launcher.PROTOCOL_MAGIC);
|
output.writeInt(Launcher.PROTOCOL_MAGIC);
|
||||||
output.writeBigInteger(config.publicKey.getModulus(), SecurityHelper.RSA_KEY_LENGTH + 1);
|
output.writeBigInteger(config.publicKey.getModulus(), SecurityHelper.RSA_KEY_LENGTH + 1);
|
||||||
output.writeLong(session);
|
output.writeLong(session);
|
||||||
output.writeVarInt(getType());
|
output.writeVarInt(getLegacyType());
|
||||||
output.flush();
|
output.flush();
|
||||||
|
|
||||||
// Verify is accepted
|
// Verify is accepted
|
||||||
|
|
|
@ -17,7 +17,7 @@ public ExecCommandRequest(LogHelper.Output output, String cmd) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer getType() {
|
public Integer getLegacyType() {
|
||||||
return RequestType.EXECCOMMAND.getNumber();
|
return RequestType.EXECCOMMAND.getNumber();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
import ru.gravit.launcher.profiles.PlayerProfile;
|
import ru.gravit.launcher.profiles.PlayerProfile;
|
||||||
import ru.gravit.launcher.request.Request;
|
import ru.gravit.launcher.request.Request;
|
||||||
import ru.gravit.launcher.request.RequestType;
|
import ru.gravit.launcher.request.RequestType;
|
||||||
|
import ru.gravit.launcher.request.websockets.RequestInterface;
|
||||||
import ru.gravit.launcher.serialize.HInput;
|
import ru.gravit.launcher.serialize.HInput;
|
||||||
import ru.gravit.launcher.serialize.HOutput;
|
import ru.gravit.launcher.serialize.HOutput;
|
||||||
import ru.gravit.launcher.serialize.SerializeLimits;
|
import ru.gravit.launcher.serialize.SerializeLimits;
|
||||||
|
@ -71,7 +72,7 @@ public AuthRequest(String login, byte[] encryptedPassword, HWID hwid, int auth_i
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer getType() {
|
public Integer getLegacyType() {
|
||||||
return RequestType.AUTH.getNumber();
|
return RequestType.AUTH.getNumber();
|
||||||
}
|
}
|
||||||
/*public class EchoRequest implements RequestInterface
|
/*public class EchoRequest implements RequestInterface
|
||||||
|
@ -83,7 +84,7 @@ public EchoRequest(String echo) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getType() {
|
public String getLegacyType() {
|
||||||
return "echo";
|
return "echo";
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
|
|
@ -71,7 +71,7 @@ public AuthServerRequest(String login, byte[] encryptedPassword, int auth_id) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer getType() {
|
public Integer getLegacyType() {
|
||||||
return RequestType.SERVERAUTH.getNumber();
|
return RequestType.SERVERAUTH.getNumber();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
public class ChangeServerRequest extends Request<ChangeServerRequest.Result> {
|
public class ChangeServerRequest extends Request<ChangeServerRequest.Result> {
|
||||||
@Override
|
@Override
|
||||||
public Integer getType() {
|
public Integer getLegacyType() {
|
||||||
return RequestType.CHANGESERVER.getNumber();
|
return RequestType.CHANGESERVER.getNumber();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ public CheckServerRequest(String username, String serverID) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer getType() {
|
public Integer getLegacyType() {
|
||||||
return RequestType.CHECK_SERVER.getNumber();
|
return RequestType.CHECK_SERVER.getNumber();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ public JoinServerRequest(String username, String accessToken, String serverID) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer getType() {
|
public Integer getLegacyType() {
|
||||||
return RequestType.JOIN_SERVER.getNumber();
|
return RequestType.JOIN_SERVER.getNumber();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ public SetProfileRequest(LauncherConfig config, ClientProfile profile) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer getType() {
|
public Integer getLegacyType() {
|
||||||
return RequestType.SETPROFILE.getNumber();
|
return RequestType.SETPROFILE.getNumber();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@ public LauncherRequest(LauncherConfig config) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer getType() {
|
public Integer getLegacyType() {
|
||||||
return RequestType.LAUNCHER.getNumber();
|
return RequestType.LAUNCHER.getNumber();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ public LegacyLauncherRequest(LauncherConfig config) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer getType() {
|
public Integer getLegacyType() {
|
||||||
return RequestType.LEGACYLAUNCHER.getNumber();
|
return RequestType.LEGACYLAUNCHER.getNumber();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ public ProfilesRequest(LauncherConfig config) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer getType() {
|
public Integer getLegacyType() {
|
||||||
return RequestType.PROFILES.getNumber();
|
return RequestType.PROFILES.getNumber();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ public UpdateListRequest(LauncherConfig config) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer getType() {
|
public Integer getLegacyType() {
|
||||||
return RequestType.UPDATE_LIST.getNumber();
|
return RequestType.UPDATE_LIST.getNumber();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -285,7 +285,7 @@ private void downloadFile(Path file, HashedFile hFile, InputStream input) throws
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer getType() {
|
public Integer getLegacyType() {
|
||||||
return RequestType.UPDATE.getNumber();
|
return RequestType.UPDATE.getNumber();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ public BatchProfileByUsernameRequest(String... usernames) throws IOException {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer getType() {
|
public Integer getLegacyType() {
|
||||||
return RequestType.BATCH_PROFILE_BY_USERNAME.getNumber();
|
return RequestType.BATCH_PROFILE_BY_USERNAME.getNumber();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ public ProfileByUUIDRequest(UUID uuid) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer getType() {
|
public Integer getLegacyType() {
|
||||||
return RequestType.PROFILE_BY_UUID.getNumber();
|
return RequestType.PROFILE_BY_UUID.getNumber();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ public ProfileByUsernameRequest(String username) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer getType() {
|
public Integer getLegacyType() {
|
||||||
return RequestType.PROFILE_BY_USERNAME.getNumber();
|
return RequestType.PROFILE_BY_USERNAME.getNumber();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue