From 6c002b74c63d1f2f7f4333b4c55bacd98e0f440d Mon Sep 17 00:00:00 2001 From: Petr Ilin Date: Fri, 3 Feb 2023 17:28:57 +0300 Subject: 1.1.10 release: Changed status-code-user-not-exists 204 -> 404 --- VERSION | 2 +- build.gradle | 2 +- src/main/java/net/elytrium/limboauth/Settings.java | 12 ++++++++---- .../net/elytrium/limboauth/handler/AuthSessionHandler.java | 2 ++ 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/VERSION b/VERSION index 512a1fa..5ed5faa 100644 --- a/VERSION +++ b/VERSION @@ -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); -- cgit