diff --git a/src/main/java/fr/xephi/authme/listener/GuiCaptchaHandler.java b/src/main/java/fr/xephi/authme/listener/GuiCaptchaHandler.java index b7c5873f..bfb1985c 100644 --- a/src/main/java/fr/xephi/authme/listener/GuiCaptchaHandler.java +++ b/src/main/java/fr/xephi/authme/listener/GuiCaptchaHandler.java @@ -40,7 +40,7 @@ public class GuiCaptchaHandler implements Listener { //define global enabled //define timesLeft - private int timesLeft = 3; + public int timesLeft = 3; //Use ConcurrentHashMap to store player and their close reason protected static ConcurrentHashMap closeReasonMap = new ConcurrentHashMap<>(); //define randomStringSet @@ -49,7 +49,17 @@ public class GuiCaptchaHandler implements Listener { Random randomItemSet = new Random(); Random howManyRandom = new Random(); - +// public int tryTimesReset(){ +// int tmp = 1; +// if (AuthMe.settings.getProperty(SecuritySettings.GUI_CAPTCHA_MAX_TRY) < 1){ +// return tmp; +// } +// if (AuthMe.settings.getProperty(SecuritySettings.GUI_CAPTCHA_MAX_TRY) >= 1){ +// tmp = AuthMe.settings.getProperty(SecuritySettings.GUI_CAPTCHA_MAX_TRY); +// return tmp; +// } +// return 3; +// } int howLongIsRandomString = (howManyRandom.nextInt(3)+1); public GuiCaptchaHandler(Plugin plugin) { diff --git a/src/main/java/fr/xephi/authme/settings/properties/SecuritySettings.java b/src/main/java/fr/xephi/authme/settings/properties/SecuritySettings.java index 622780a8..23490ac8 100644 --- a/src/main/java/fr/xephi/authme/settings/properties/SecuritySettings.java +++ b/src/main/java/fr/xephi/authme/settings/properties/SecuritySettings.java @@ -38,8 +38,8 @@ public final class SecuritySettings implements SettingsHolder { public static final Property GUI_CAPTCHA_BE_COMPATIBILITY = newProperty("3rdPartyFeature.captcha.ignoreBedrock",false); // @Comment({"Should we kick the players when they failed captcha too many times?", -// "(Set this to 0 to disable)(Default: 4)"}) -// public static final Property GUI_CAPTCHA_MAX_TRY = newProperty("3rdPartyFeature.captcha.maxTryTimes",4); +// "(Minimum value is 1)(Default: 3)"}) +// public static final Property GUI_CAPTCHA_MAX_TRY = newProperty("3rdPartyFeature.captcha.maxTryTimes",3); //@Comment({"Using which API to get hash data?",