Skip to content

Commit

Permalink
Fix error in ajq kick when specifying a queue for a player not in tha…
Browse files Browse the repository at this point in the history
…t queue
  • Loading branch information
ajgeiss0702 committed Mar 5, 2025
1 parent 38eaa1a commit 7db99d1
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ public void execute(ICommandSender sender, String[] args) {
sender.sendMessage(getMessages().getComponent("commands.kick.unknown-server", "QUEUE:"+args[1]));
return;
}
kickPlayers = Collections.singletonList(queue.findPlayer(args[0]));
QueuePlayer player = queue.findPlayer(args[0]);
if(player == null) {
kickPlayers = Collections.emptyList();
} else {
kickPlayers = Collections.singletonList(player);
}
}

if(kickPlayers.isEmpty()) {
Expand Down

0 comments on commit 7db99d1

Please sign in to comment.