mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +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();
|
||||
|
||||
@Override
|
||||
public final Integer getType() {
|
||||
public final Integer getLegacyType() {
|
||||
return 255;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public PingRequest(LauncherConfig config) {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Integer getType() {
|
||||
public Integer getLegacyType() {
|
||||
return RequestType.PING.getNumber();
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -17,7 +17,7 @@ public ExecCommandRequest(LogHelper.Output output, String cmd) {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Integer getType() {
|
||||
public Integer getLegacyType() {
|
||||
return RequestType.EXECCOMMAND.getNumber();
|
||||
}
|
||||
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
}*/
|
||||
|
|
|
@ -71,7 +71,7 @@ public AuthServerRequest(String login, byte[] encryptedPassword, int auth_id) {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Integer getType() {
|
||||
public Integer getLegacyType() {
|
||||
return RequestType.SERVERAUTH.getNumber();
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
public class ChangeServerRequest extends Request<ChangeServerRequest.Result> {
|
||||
@Override
|
||||
public Integer getType() {
|
||||
public Integer getLegacyType() {
|
||||
return RequestType.CHANGESERVER.getNumber();
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ public CheckServerRequest(String username, String serverID) {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Integer getType() {
|
||||
public Integer getLegacyType() {
|
||||
return RequestType.CHECK_SERVER.getNumber();
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ public JoinServerRequest(String username, String accessToken, String serverID) {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Integer getType() {
|
||||
public Integer getLegacyType() {
|
||||
return RequestType.JOIN_SERVER.getNumber();
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ public SetProfileRequest(LauncherConfig config, ClientProfile profile) {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Integer getType() {
|
||||
public Integer getLegacyType() {
|
||||
return RequestType.SETPROFILE.getNumber();
|
||||
}
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ public LauncherRequest(LauncherConfig config) {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Integer getType() {
|
||||
public Integer getLegacyType() {
|
||||
return RequestType.LAUNCHER.getNumber();
|
||||
}
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ public LegacyLauncherRequest(LauncherConfig config) {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Integer getType() {
|
||||
public Integer getLegacyType() {
|
||||
return RequestType.LEGACYLAUNCHER.getNumber();
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ public ProfilesRequest(LauncherConfig config) {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Integer getType() {
|
||||
public Integer getLegacyType() {
|
||||
return RequestType.PROFILES.getNumber();
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ public UpdateListRequest(LauncherConfig config) {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Integer getType() {
|
||||
public Integer getLegacyType() {
|
||||
return RequestType.UPDATE_LIST.getNumber();
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ public BatchProfileByUsernameRequest(String... usernames) throws IOException {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Integer getType() {
|
||||
public Integer getLegacyType() {
|
||||
return RequestType.BATCH_PROFILE_BY_USERNAME.getNumber();
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ public ProfileByUUIDRequest(UUID uuid) {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Integer getType() {
|
||||
public Integer getLegacyType() {
|
||||
return RequestType.PROFILE_BY_UUID.getNumber();
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ public ProfileByUsernameRequest(String username) {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Integer getType() {
|
||||
public Integer getLegacyType() {
|
||||
return RequestType.PROFILE_BY_USERNAME.getNumber();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue