diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/CustomRequest.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/CustomRequest.java index cb886b1a..47fb20ab 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/CustomRequest.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/CustomRequest.java @@ -21,7 +21,7 @@ public CustomRequest(LauncherConfig config) { public abstract String getName(); @Override - public final Integer getType() { + public final Integer getLegacyType() { return 255; } diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/PingRequest.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/PingRequest.java index 36e529a1..c725aff6 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/PingRequest.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/PingRequest.java @@ -21,7 +21,7 @@ public PingRequest(LauncherConfig config) { } @Override - public Integer getType() { + public Integer getLegacyType() { return RequestType.PING.getNumber(); } diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/Request.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/Request.java index a3de66a9..43975ed8 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/Request.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/Request.java @@ -44,7 +44,7 @@ protected Request(LauncherConfig config) { } @LauncherAPI - public abstract Integer getType(); + public abstract Integer getLegacyType(); @LauncherAPI 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.writeBigInteger(config.publicKey.getModulus(), SecurityHelper.RSA_KEY_LENGTH + 1); output.writeLong(session); - output.writeVarInt(getType()); + output.writeVarInt(getLegacyType()); output.flush(); // Verify is accepted diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/admin/ExecCommandRequest.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/admin/ExecCommandRequest.java index a929591d..bf2cd2fd 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/admin/ExecCommandRequest.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/admin/ExecCommandRequest.java @@ -17,7 +17,7 @@ public ExecCommandRequest(LogHelper.Output output, String cmd) { } @Override - public Integer getType() { + public Integer getLegacyType() { return RequestType.EXECCOMMAND.getNumber(); } diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/AuthRequest.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/AuthRequest.java index 6050385a..0c231744 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/AuthRequest.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/AuthRequest.java @@ -5,6 +5,7 @@ import ru.gravit.launcher.profiles.PlayerProfile; import ru.gravit.launcher.request.Request; import ru.gravit.launcher.request.RequestType; +import ru.gravit.launcher.request.websockets.RequestInterface; import ru.gravit.launcher.serialize.HInput; import ru.gravit.launcher.serialize.HOutput; import ru.gravit.launcher.serialize.SerializeLimits; @@ -71,7 +72,7 @@ public AuthRequest(String login, byte[] encryptedPassword, HWID hwid, int auth_i } @Override - public Integer getType() { + public Integer getLegacyType() { return RequestType.AUTH.getNumber(); } /*public class EchoRequest implements RequestInterface @@ -83,7 +84,7 @@ public EchoRequest(String echo) { } @Override - public String getType() { + public String getLegacyType() { return "echo"; } }*/ diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/AuthServerRequest.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/AuthServerRequest.java index 49113e5a..829fc0a3 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/AuthServerRequest.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/AuthServerRequest.java @@ -71,7 +71,7 @@ public AuthServerRequest(String login, byte[] encryptedPassword, int auth_id) { } @Override - public Integer getType() { + public Integer getLegacyType() { return RequestType.SERVERAUTH.getNumber(); } diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/ChangeServerRequest.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/ChangeServerRequest.java index 0ea7877a..ecb4399e 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/ChangeServerRequest.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/ChangeServerRequest.java @@ -10,7 +10,7 @@ public class ChangeServerRequest extends Request { @Override - public Integer getType() { + public Integer getLegacyType() { return RequestType.CHANGESERVER.getNumber(); } diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/CheckServerRequest.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/CheckServerRequest.java index fe6ed565..94c29a23 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/CheckServerRequest.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/CheckServerRequest.java @@ -32,7 +32,7 @@ public CheckServerRequest(String username, String serverID) { } @Override - public Integer getType() { + public Integer getLegacyType() { return RequestType.CHECK_SERVER.getNumber(); } diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/JoinServerRequest.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/JoinServerRequest.java index 8ff35b46..0ff36115 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/JoinServerRequest.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/JoinServerRequest.java @@ -34,7 +34,7 @@ public JoinServerRequest(String username, String accessToken, String serverID) { } @Override - public Integer getType() { + public Integer getLegacyType() { return RequestType.JOIN_SERVER.getNumber(); } diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/SetProfileRequest.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/SetProfileRequest.java index 191b77b2..4dee1fd2 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/SetProfileRequest.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/SetProfileRequest.java @@ -17,7 +17,7 @@ public SetProfileRequest(LauncherConfig config, ClientProfile profile) { } @Override - public Integer getType() { + public Integer getLegacyType() { return RequestType.SETPROFILE.getNumber(); } diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/LauncherRequest.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/LauncherRequest.java index f8ed16ff..7150ff6d 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/LauncherRequest.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/LauncherRequest.java @@ -77,7 +77,7 @@ public LauncherRequest(LauncherConfig config) { } @Override - public Integer getType() { + public Integer getLegacyType() { return RequestType.LAUNCHER.getNumber(); } diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/LegacyLauncherRequest.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/LegacyLauncherRequest.java index 7fd08e96..30d643b1 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/LegacyLauncherRequest.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/LegacyLauncherRequest.java @@ -88,7 +88,7 @@ public LegacyLauncherRequest(LauncherConfig config) { } @Override - public Integer getType() { + public Integer getLegacyType() { return RequestType.LEGACYLAUNCHER.getNumber(); } diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/ProfilesRequest.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/ProfilesRequest.java index 3c8a3104..9b831296 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/ProfilesRequest.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/ProfilesRequest.java @@ -27,7 +27,7 @@ public ProfilesRequest(LauncherConfig config) { } @Override - public Integer getType() { + public Integer getLegacyType() { return RequestType.PROFILES.getNumber(); } diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/UpdateListRequest.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/UpdateListRequest.java index fb9c67d2..4581e8e1 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/UpdateListRequest.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/UpdateListRequest.java @@ -25,7 +25,7 @@ public UpdateListRequest(LauncherConfig config) { } @Override - public Integer getType() { + public Integer getLegacyType() { return RequestType.UPDATE_LIST.getNumber(); } diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/UpdateRequest.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/UpdateRequest.java index 5d065966..687c656a 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/UpdateRequest.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/UpdateRequest.java @@ -285,7 +285,7 @@ private void downloadFile(Path file, HashedFile hFile, InputStream input) throws } @Override - public Integer getType() { + public Integer getLegacyType() { return RequestType.UPDATE.getNumber(); } diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/uuid/BatchProfileByUsernameRequest.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/uuid/BatchProfileByUsernameRequest.java index f7a43a61..471b184f 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/uuid/BatchProfileByUsernameRequest.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/uuid/BatchProfileByUsernameRequest.java @@ -32,7 +32,7 @@ public BatchProfileByUsernameRequest(String... usernames) throws IOException { } @Override - public Integer getType() { + public Integer getLegacyType() { return RequestType.BATCH_PROFILE_BY_USERNAME.getNumber(); } diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/uuid/ProfileByUUIDRequest.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/uuid/ProfileByUUIDRequest.java index f9f8cf69..d7c0cab4 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/uuid/ProfileByUUIDRequest.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/uuid/ProfileByUUIDRequest.java @@ -30,7 +30,7 @@ public ProfileByUUIDRequest(UUID uuid) { } @Override - public Integer getType() { + public Integer getLegacyType() { return RequestType.PROFILE_BY_UUID.getNumber(); } diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/uuid/ProfileByUsernameRequest.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/uuid/ProfileByUsernameRequest.java index 1630deb9..a256b2ef 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/uuid/ProfileByUsernameRequest.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/uuid/ProfileByUsernameRequest.java @@ -29,7 +29,7 @@ public ProfileByUsernameRequest(String username) { } @Override - public Integer getType() { + public Integer getLegacyType() { return RequestType.PROFILE_BY_USERNAME.getNumber(); }