From 4888cfa1dcd841862ba807487c1b88835f96552a Mon Sep 17 00:00:00 2001 From: thmsdy Date: Thu, 14 Feb 2019 01:40:27 -0600 Subject: [PATCH] fixed plugin not allowing exempt players to join if not verified --- .../com/fpghoti/bcraftbot/listener/PlayerListener.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/fpghoti/bcraftbot/listener/PlayerListener.java b/src/main/java/com/fpghoti/bcraftbot/listener/PlayerListener.java index c1ee3e7..4d46c82 100644 --- a/src/main/java/com/fpghoti/bcraftbot/listener/PlayerListener.java +++ b/src/main/java/com/fpghoti/bcraftbot/listener/PlayerListener.java @@ -24,9 +24,7 @@ public class PlayerListener implements Listener { @EventHandler public void onPlayerLogin(PlayerLoginEvent event){ Player player = event.getPlayer(); - if(!plugin.isMember(player)) { - event.disallow(Result.KICK_OTHER, plugin.getKickMessage()); - }else { + if(plugin.isMember(player) || plugin.isExempt(player.getName())) { if(plugin.assignRole()) { for(Guild guild : plugin.getBot().getJDA().getGuilds()) { @@ -44,9 +42,10 @@ public class PlayerListener implements Listener { guild.getController().addRolesToMember(mem, role).queue(); } - } } + }else { + event.disallow(Result.KICK_OTHER, plugin.getKickMessage()); } }