From 66b2bf84366a30aab680234db9c7b8aaa185ebab Mon Sep 17 00:00:00 2001 From: HaHaWTH Date: Sat, 23 Sep 2023 18:40:18 +0800 Subject: [PATCH] Code Improvement --- .../java/fr/xephi/authme/listener/GuiCaptchaHandler.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/fr/xephi/authme/listener/GuiCaptchaHandler.java b/src/main/java/fr/xephi/authme/listener/GuiCaptchaHandler.java index 61ed89c4a..793a93543 100644 --- a/src/main/java/fr/xephi/authme/listener/GuiCaptchaHandler.java +++ b/src/main/java/fr/xephi/authme/listener/GuiCaptchaHandler.java @@ -135,7 +135,7 @@ public void onPlayerJoin(PlayerJoinEvent event) { ItemMeta meta = item.getItemMeta(); try { if (meta != null) { - meta.setDisplayName("§a我是" + "§a真人"); + meta.setDisplayName("§a我是真人"); item.setItemMeta(meta); // goldBlock.setItemMeta(meta); } @@ -166,7 +166,8 @@ public void onPlayerJoin(PlayerJoinEvent event) { long timeOut = AuthMe.settings.getProperty(SecuritySettings.GUI_CAPTCHA_TIMEOUT); if (AuthMe.settings.getProperty(SecuritySettings.GUI_CAPTCHA_TIMEOUT) > AuthMe.settings.getProperty(RestrictionSettings.TIMEOUT)){ Bukkit.getScheduler().runTask(this.plugin,() -> { - Bukkit.getLogger().warning("AuthMe detected that your GUI captcha timeout seconds(" + AuthMe.settings.getProperty(SecuritySettings.GUI_CAPTCHA_TIMEOUT) + ") is bigger than the Login timeout seconds(" + AuthMe.settings.getProperty(RestrictionSettings.TIMEOUT) + "). To prevent issues, we will make the GUI captcha follow the Login timeout seconds, please check and modify your config."); + Bukkit.getLogger().warning("AuthMe detected that your GUI captcha timeout seconds(" + AuthMe.settings.getProperty(SecuritySettings.GUI_CAPTCHA_TIMEOUT) + ") is bigger than the Login timeout seconds(" + + AuthMe.settings.getProperty(RestrictionSettings.TIMEOUT) + "). To prevent issues, we will let the GUI captcha follow the Login timeout seconds, please check and modify your config."); }); timeOut = AuthMe.settings.getProperty(RestrictionSettings.TIMEOUT); }