From 589477888f6ae8abe47d68a0cff39a769f44a42d Mon Sep 17 00:00:00 2001 From: Gravita Date: Wed, 15 Dec 2021 18:37:56 +0700 Subject: [PATCH] [FIX] Remove verifyUsername --- .../main/java/pro/gravit/launcher/profiles/PlayerProfile.java | 2 +- .../pro/gravit/launcher/request/auth/CheckServerRequest.java | 2 +- .../pro/gravit/launcher/request/auth/JoinServerRequest.java | 2 +- .../launcher/request/uuid/BatchProfileByUsernameRequest.java | 2 -- .../gravit/launcher/request/uuid/ProfileByUsernameRequest.java | 2 +- 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/PlayerProfile.java b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/PlayerProfile.java index 115500b7..09ebeac1 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/PlayerProfile.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/PlayerProfile.java @@ -15,7 +15,7 @@ public final class PlayerProfile { public PlayerProfile(UUID uuid, String username, Texture skin, Texture cloak) { this.uuid = Objects.requireNonNull(uuid, "uuid"); - this.username = VerifyHelper.verifyUsername(username); + this.username = username; this.skin = skin; this.cloak = cloak; } diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/CheckServerRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/CheckServerRequest.java index e8c79910..ac647341 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/CheckServerRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/CheckServerRequest.java @@ -14,7 +14,7 @@ public final class CheckServerRequest extends Request i public CheckServerRequest(String username, String serverID) { - this.username = VerifyHelper.verifyUsername(username); + this.username = username; this.serverID = VerifyHelper.verifyServerID(serverID); } diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/JoinServerRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/JoinServerRequest.java index 19e028cc..6a3cf1ab 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/JoinServerRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/JoinServerRequest.java @@ -18,7 +18,7 @@ public final class JoinServerRequest extends Request imp public JoinServerRequest(String username, String accessToken, String serverID) { - this.username = VerifyHelper.verifyUsername(username); + this.username = username; this.accessToken = accessToken; this.serverID = VerifyHelper.verifyServerID(serverID); } diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/BatchProfileByUsernameRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/BatchProfileByUsernameRequest.java index b120341c..20708419 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/BatchProfileByUsernameRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/BatchProfileByUsernameRequest.java @@ -21,8 +21,6 @@ public BatchProfileByUsernameRequest(String... usernames) throws IOException { this.list[i].username = usernames[i]; } IOHelper.verifyLength(usernames.length, IOHelper.MAX_BATCH_SIZE); - for (String username : usernames) - VerifyHelper.verifyUsername(username); } @Override diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/ProfileByUsernameRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/ProfileByUsernameRequest.java index 9b7c1d8b..43c5c02a 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/ProfileByUsernameRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/ProfileByUsernameRequest.java @@ -12,7 +12,7 @@ public final class ProfileByUsernameRequest extends Request