aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/net/elytrium/limboauth/LimboAuth.java
diff options
context:
space:
mode:
authorPetr Ilin <hevav@hevav.dev>2023-02-06 21:39:28 +0300
committerPetr Ilin <hevav@hevav.dev>2023-02-06 21:39:28 +0300
commit30341e2a6d5a0b67fec76c62e832a4667b84736b (patch)
tree268ea54fa0e657972f23c40c697c3bb015858585 /src/main/java/net/elytrium/limboauth/LimboAuth.java
parent6c002b74c63d1f2f7f4333b4c55bacd98e0f440d (diff)
downloadLimboAuth-30341e2a6d5a0b67fec76c62e832a4667b84736b.tar.gz
LimboAuth-30341e2a6d5a0b67fec76c62e832a4667b84736b.tar.bz2
LimboAuth-30341e2a6d5a0b67fec76c62e832a4667b84736b.zip
1.1.11 release: status-code-* options are now lists
Diffstat (limited to 'src/main/java/net/elytrium/limboauth/LimboAuth.java')
-rw-r--r--src/main/java/net/elytrium/limboauth/LimboAuth.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/net/elytrium/limboauth/LimboAuth.java b/src/main/java/net/elytrium/limboauth/LimboAuth.java
index de03a22..76b89f8 100644
--- a/src/main/java/net/elytrium/limboauth/LimboAuth.java
+++ b/src/main/java/net/elytrium/limboauth/LimboAuth.java
@@ -682,18 +682,18 @@ public class LimboAuth {
int statusCode = response.statusCode();
- if (statusCode == Settings.IMP.MAIN.STATUS_CODE_RATE_LIMIT) {
+ if (Settings.IMP.MAIN.STATUS_CODE_RATE_LIMIT.contains(statusCode)) {
return new PremiumResponse(PremiumState.RATE_LIMIT);
}
JsonElement jsonElement = JsonParser.parseString(response.body());
- if (statusCode == Settings.IMP.MAIN.STATUS_CODE_USER_EXISTS
+ if (Settings.IMP.MAIN.STATUS_CODE_USER_EXISTS.contains(statusCode)
&& this.validateScheme(jsonElement, Settings.IMP.MAIN.USER_EXISTS_JSON_VALIDATOR_FIELDS)) {
return new PremiumResponse(PremiumState.PREMIUM_USERNAME, ((JsonObject) jsonElement).get(Settings.IMP.MAIN.JSON_UUID_FIELD).getAsString());
}
- if (statusCode == Settings.IMP.MAIN.STATUS_CODE_USER_NOT_EXISTS
+ if (Settings.IMP.MAIN.STATUS_CODE_USER_NOT_EXISTS.contains(statusCode)
&& this.validateScheme(jsonElement, Settings.IMP.MAIN.USER_NOT_EXISTS_JSON_VALIDATOR_FIELDS)) {
return new PremiumResponse(PremiumState.CRACKED);
}