diff options
author | Petr Ilin <hevav@hevav.dev> | 2023-02-03 17:28:57 +0300 |
---|---|---|
committer | Petr Ilin <hevav@hevav.dev> | 2023-02-03 17:28:57 +0300 |
commit | 6c002b74c63d1f2f7f4333b4c55bacd98e0f440d (patch) | |
tree | 5e4591ed952f7914e1dfd16c790efa6f244aa5f2 | |
parent | 1be26878bb5be947d8a401bb62ae8b3eae503986 (diff) | |
download | LimboAuth-6c002b74c63d1f2f7f4333b4c55bacd98e0f440d.tar.gz LimboAuth-6c002b74c63d1f2f7f4333b4c55bacd98e0f440d.tar.bz2 LimboAuth-6c002b74c63d1f2f7f4333b4c55bacd98e0f440d.zip |
1.1.10 release: Changed status-code-user-not-exists 204 -> 404
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | build.gradle | 2 | ||||
-rw-r--r-- | src/main/java/net/elytrium/limboauth/Settings.java | 12 | ||||
-rw-r--r-- | src/main/java/net/elytrium/limboauth/handler/AuthSessionHandler.java | 2 |
4 files changed, 12 insertions, 6 deletions
@@ -1 +1 @@ -1.1.9 +1.1.10 diff --git a/build.gradle b/build.gradle index 11881c2..3e82328 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ plugins { } setGroup("net.elytrium") -setVersion("1.1.9") +setVersion("1.1.10") java { setSourceCompatibility(JavaVersion.VERSION_11) diff --git a/src/main/java/net/elytrium/limboauth/Settings.java b/src/main/java/net/elytrium/limboauth/Settings.java index 68bbe17..e2b45c3 100644 --- a/src/main/java/net/elytrium/limboauth/Settings.java +++ b/src/main/java/net/elytrium/limboauth/Settings.java @@ -186,14 +186,18 @@ public class Settings extends YamlConfig { "Set 200 if you use using Mojang or CloudFlare API" }) public int STATUS_CODE_USER_EXISTS = 200; - @Comment("Set 204 if you use Mojang API, 404 if you use CloudFlare API") - public int STATUS_CODE_USER_NOT_EXISTS = 204; + @Comment("Set 404 if you use Mojang or CloudFlare API") + public int STATUS_CODE_USER_NOT_EXISTS = 404; @Comment("Set 429 if you use Mojang or CloudFlare API") public int STATUS_CODE_RATE_LIMIT = 429; @Comment({ - "Sample Mojang API response: {\"name\":\"hevav\",\"id\":\"9c7024b2a48746b3b3934f397ae5d70f\"}", - "Sample CloudFlare API response: {\"uuid\":\"9c7024b2a48746b3b3934f397ae5d70f\",\"username\":\"hevav\", ...}", + "Sample Mojang API exists response: {\"name\":\"hevav\",\"id\":\"9c7024b2a48746b3b3934f397ae5d70f\"}", + "Sample CloudFlare API exists response: {\"uuid\":\"9c7024b2a48746b3b3934f397ae5d70f\",\"username\":\"hevav\", ...}", + "", + "Sample Mojang API not exists response: {\"path\":\"/users/profiles/minecraft/someletters1234566\",\"errorMessage\":\"Couldn't find any profile with that name\"}", + "Sample CloudFlare API not exists response: {\"code\":404,\"error\":\"Not Found\",\"reason\":\"No user with the name 'someletters123456' was found\"}", + "", "Responses with an invalid scheme will be identified as responses with a server error", "Set this parameter to [], to disable JSON scheme validation" }) diff --git a/src/main/java/net/elytrium/limboauth/handler/AuthSessionHandler.java b/src/main/java/net/elytrium/limboauth/handler/AuthSessionHandler.java index 1d20a7f..3e75d43 100644 --- a/src/main/java/net/elytrium/limboauth/handler/AuthSessionHandler.java +++ b/src/main/java/net/elytrium/limboauth/handler/AuthSessionHandler.java @@ -432,6 +432,8 @@ public class AuthSessionHandler implements LimboSessionHandler { this.plugin.updateLoginData(this.proxyPlayer); } catch (SQLException e) { throw new SQLRuntimeException(e); + } catch (Throwable e) { + e.printStackTrace(); } this.plugin.cacheAuthUser(this.proxyPlayer); |