fixed plugin not allowing exempt players to join if not verified
This commit is contained in:
parent
0343a07dab
commit
4888cfa1dc
|
@ -24,9 +24,7 @@ public class PlayerListener implements Listener {
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerLogin(PlayerLoginEvent event){
|
public void onPlayerLogin(PlayerLoginEvent event){
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
if(!plugin.isMember(player)) {
|
if(plugin.isMember(player) || plugin.isExempt(player.getName())) {
|
||||||
event.disallow(Result.KICK_OTHER, plugin.getKickMessage());
|
|
||||||
}else {
|
|
||||||
if(plugin.assignRole()) {
|
if(plugin.assignRole()) {
|
||||||
for(Guild guild : plugin.getBot().getJDA().getGuilds()) {
|
for(Guild guild : plugin.getBot().getJDA().getGuilds()) {
|
||||||
|
|
||||||
|
@ -44,9 +42,10 @@ public class PlayerListener implements Listener {
|
||||||
guild.getController().addRolesToMember(mem, role).queue();
|
guild.getController().addRolesToMember(mem, role).queue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}else {
|
||||||
|
event.disallow(Result.KICK_OTHER, plugin.getKickMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue