Cleanup
This commit is contained in:
parent
9f70748b55
commit
08ed6504f2
@ -38,7 +38,7 @@ public class GuiCaptchaHandler implements Listener {
|
|||||||
private final AuthMeApi authmeApi = AuthMeApi.getInstance();
|
private final AuthMeApi authmeApi = AuthMeApi.getInstance();
|
||||||
private final Plugin plugin;
|
private final Plugin plugin;
|
||||||
//define global enabled
|
//define global enabled
|
||||||
public static boolean enabled=true;
|
|
||||||
//define timesLeft
|
//define timesLeft
|
||||||
private int timesLeft = 3;
|
private int timesLeft = 3;
|
||||||
//Use ConcurrentHashMap to store player and their close reason
|
//Use ConcurrentHashMap to store player and their close reason
|
||||||
@ -61,9 +61,7 @@ public class GuiCaptchaHandler implements Listener {
|
|||||||
public void onInventoryClick(InventoryClickEvent event) {
|
public void onInventoryClick(InventoryClickEvent event) {
|
||||||
if (event.getWhoClicked() instanceof Player) {
|
if (event.getWhoClicked() instanceof Player) {
|
||||||
Player player = (Player) event.getWhoClicked();
|
Player player = (Player) event.getWhoClicked();
|
||||||
ItemStack item = event.getCurrentItem();
|
|
||||||
// 获取点击事件的容器
|
// 获取点击事件的容器
|
||||||
Inventory inventory = event.getInventory();
|
|
||||||
if (!authmeApi.isRegistered(player.getName()) && !closeReasonMap.containsKey(player)) {
|
if (!authmeApi.isRegistered(player.getName()) && !closeReasonMap.containsKey(player)) {
|
||||||
if(AuthMe.settings.getProperty(HooksSettings.HOOK_FLOODGATE_PLAYER) && AuthMe.settings.getProperty(SecuritySettings.GUI_CAPTCHA_BE_COMPATIBILITY) && org.geysermc.floodgate.api.FloodgateApi.getInstance().isFloodgateId(event.getWhoClicked().getUniqueId()) && ( getServer().getPluginManager().isPluginEnabled("floodgate") || getServer().getPluginManager().getPlugin("floodgate") != null)){
|
if(AuthMe.settings.getProperty(HooksSettings.HOOK_FLOODGATE_PLAYER) && AuthMe.settings.getProperty(SecuritySettings.GUI_CAPTCHA_BE_COMPATIBILITY) && org.geysermc.floodgate.api.FloodgateApi.getInstance().isFloodgateId(event.getWhoClicked().getUniqueId()) && ( getServer().getPluginManager().isPluginEnabled("floodgate") || getServer().getPluginManager().getPlugin("floodgate") != null)){
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user