diff --git a/src/de/steamwar/misslewars/commands/CommandInvite.java b/src/de/steamwar/misslewars/commands/CommandInvite.java index 1f7414d..0814c3f 100644 --- a/src/de/steamwar/misslewars/commands/CommandInvite.java +++ b/src/de/steamwar/misslewars/commands/CommandInvite.java @@ -74,14 +74,24 @@ public class CommandInvite implements CommandExecutor, TabCompleter { team.invitePlayer(invitedPlayer); player.sendMessage("§7Du hast §e" + invitedPlayer.getName() + " §7eingeladen."); invitedPlayer.sendMessage("§7Du wurdest von §e" + player.getName() + "§7 in das Team §e" + MissileWars.getTeam(player).getColoredName() + "§7 eingeladen."); - invitedPlayer.sendMessage("§8/§6accept §8- §7Zum akzeptieren."); - invitedPlayer.sendMessage("§8/§6decline §8- §7Zum ablehnen."); + invitedPlayer.sendMessage("§8/§eaccept §8- §7Zum akzeptieren."); + invitedPlayer.sendMessage("§8/§edecline §8- §7Zum ablehnen."); return false; } @Override public List onTabComplete(CommandSender sender, Command command, String label, String[] args) { - if (args.length != 1) return new ArrayList<>(); + if (args.length == 0) { + return Bukkit.getOnlinePlayers() + .stream() + .filter(p -> MissileWars.getTeam(p) != null) + .filter(p -> MissileWars.getInvitation(p) != null) + .map(Player::getName) + .collect(Collectors.toList()); + } + if (args.length != 1) { + return new ArrayList<>(); + } return Bukkit.getOnlinePlayers() .stream() .filter(p -> MissileWars.getTeam(p) != null)