Skip to content

Commit

Permalink
Fixed skip-queue-server-if-possible ignoring paused and manually full…
Browse files Browse the repository at this point in the history
… servers
  • Loading branch information
ajgeiss0702 committed Dec 18, 2023
1 parent 0ecf7e7 commit ad1fc00
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void execute(ICommandSender sender, String[] args) {
kickPlayers = Collections.singletonList(queue.findPlayer(args[0]));
}

if(kickPlayers.size() == 0) {
if(kickPlayers.isEmpty()) {
sender.sendMessage(getMessages().getComponent("commands.kick.no-player", "PLAYER:"+args[0]));
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ public void onServerKick(AdaptedPlayer player, @NotNull AdaptedServer from, Comp
AdaptedServer ideal = to.getIdealServer(player);

if(ideal == null) return null;
if(!to.isJoinable(player)) return null;
if(!ideal.isJoinable(player)) return null;
if(!(!main.getConfig().getBoolean("require-queueserver-permission") || player.hasPermission("ajqueue.queueserver." + to.getName()))) return null;

Expand Down

0 comments on commit ad1fc00

Please sign in to comment.