Fix CommandInvite TabCompleter
Dieser Commit ist enthalten in:
Ursprung
a6293e163d
Commit
14b68fa45a
@ -81,7 +81,7 @@ public class CommandInvite implements CommandExecutor, TabCompleter {
|
||||
|
||||
@Override
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (args.length == 0) {
|
||||
if (args.length == 1) {
|
||||
return Bukkit.getOnlinePlayers()
|
||||
.stream()
|
||||
.filter(p -> MissileWars.getTeam(p) != null)
|
||||
@ -89,16 +89,7 @@ public class CommandInvite implements CommandExecutor, TabCompleter {
|
||||
.map(Player::getName)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
if (args.length != 1) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return Bukkit.getOnlinePlayers()
|
||||
.stream()
|
||||
.filter(p -> MissileWars.getTeam(p) != null)
|
||||
.filter(p -> MissileWars.getInvitation(p) != null)
|
||||
.map(Player::getName)
|
||||
.filter(s -> s.startsWith(args[0]))
|
||||
.collect(Collectors.toList());
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren