fixed plugin not allowing exempt players to join if not verified

This commit is contained in:
Ghoti 2019-02-14 01:40:27 -06:00
parent 0343a07dab
commit 4888cfa1dc
1 changed files with 3 additions and 4 deletions

View File

@ -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());
}
}