Format
This commit is contained in:
parent
1e3e625c1a
commit
4dedc30d94
@ -62,6 +62,11 @@ public class GuiCaptchaHandler implements Listener{
|
|||||||
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;
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void removePacketListeners() {
|
||||||
|
ProtocolLibrary.getProtocolManager().removePacketListener(windowPacketListener);
|
||||||
|
ProtocolLibrary.getProtocolManager().removePacketListener(chatPacketListener);
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onInventoryClick(InventoryClickEvent event) {
|
public void onInventoryClick(InventoryClickEvent event) {
|
||||||
if (event.getWhoClicked() instanceof Player) {
|
if (event.getWhoClicked() instanceof Player) {
|
||||||
@ -242,12 +247,10 @@ public class GuiCaptchaHandler implements Listener{
|
|||||||
deletePlayerStats(playerUUID);
|
deletePlayerStats(playerUUID);
|
||||||
}
|
}
|
||||||
}, 100L);
|
}, 100L);
|
||||||
ProtocolLibrary.getProtocolManager().removePacketListener(windowPacketListener);
|
removePacketListeners();
|
||||||
ProtocolLibrary.getProtocolManager().removePacketListener(chatPacketListener);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ProtocolLibrary.getProtocolManager().removePacketListener(windowPacketListener);
|
removePacketListeners();
|
||||||
ProtocolLibrary.getProtocolManager().removePacketListener(chatPacketListener);
|
|
||||||
closeReasonMap.remove(player);
|
closeReasonMap.remove(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user