Minor patch for Bedrock support

This commit is contained in:
HaHaWTH 2023-12-11 22:11:21 +08:00
parent 14e5b7d5a7
commit 32939b1383
2 changed files with 7 additions and 2 deletions

View File

@ -85,7 +85,10 @@ public class GuiCaptchaHandler implements Listener {
private final List<String> whiteList = AuthMe.settings.getProperty(SecuritySettings.GUI_CAPTCHA_COUNTRY_WHITELIST);
private boolean isBedrockPlayer(UUID uuid) {
return settings.getProperty(HooksSettings.HOOK_FLOODGATE_PLAYER) && settings.getProperty(SecuritySettings.GUI_CAPTCHA_BE_COMPATIBILITY) && org.geysermc.floodgate.api.FloodgateApi.getInstance().isFloodgateId(uuid) && getServer().getPluginManager().getPlugin("floodgate") != null;
if (getServer().getPluginManager().getPlugin("floodgate") != null) {
return settings.getProperty(HooksSettings.HOOK_FLOODGATE_PLAYER) && settings.getProperty(SecuritySettings.GUI_CAPTCHA_BE_COMPATIBILITY) && org.geysermc.floodgate.api.FloodgateApi.getInstance().isFloodgateId(uuid);
}
return false;
}

View File

@ -19,7 +19,9 @@ public final class HooksSettings implements SettingsHolder {
public static final Property<Boolean> BUNGEECORD =
newProperty("Hooks.bungeecord", false);
@Comment("Allow FloodGatePlayer Join Without checkIsValidName()")
@Comment({"Allow FloodGatePlayer Join Without checkIsValidName()",
"This must be true if you want to use other bedrock features."
})
public static final Property<Boolean> HOOK_FLOODGATE_PLAYER =
newProperty("Hooks.floodgate", false);