From 5b7270816746f8a34d99616c39c33045089f3b87 Mon Sep 17 00:00:00 2001 From: HaHaWTH Date: Thu, 16 Nov 2023 22:37:41 +0800 Subject: [PATCH] Add a method to check if the player is in GUI verification --- src/main/java/fr/xephi/authme/listener/GuiCaptchaHandler.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/fr/xephi/authme/listener/GuiCaptchaHandler.java b/src/main/java/fr/xephi/authme/listener/GuiCaptchaHandler.java index e423df77..6d06cad1 100644 --- a/src/main/java/fr/xephi/authme/listener/GuiCaptchaHandler.java +++ b/src/main/java/fr/xephi/authme/listener/GuiCaptchaHandler.java @@ -70,6 +70,10 @@ public class GuiCaptchaHandler implements Listener { public GuiCaptchaHandler() { } + public static boolean isInVerification(Player player, String player_name) { + return !AuthMeApi.getInstance().isRegistered(player_name) && !closeReasonMap.containsKey(player); + } + private boolean isBedrockPlayer(UUID uuid) { return AuthMe.settings.getProperty(HooksSettings.HOOK_FLOODGATE_PLAYER) && AuthMe.settings.getProperty(SecuritySettings.GUI_CAPTCHA_BE_COMPATIBILITY) && org.geysermc.floodgate.api.FloodgateApi.getInstance().isFloodgateId(uuid) && getServer().getPluginManager().getPlugin("floodgate") != null; }