Fix CommandInvite TabCompleter #26
@ -81,7 +81,7 @@ public class CommandInvite implements CommandExecutor, TabCompleter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> onTabComplete(CommandSender sender, Command command, String label, String[] args) {
|
public List<String> onTabComplete(CommandSender sender, Command command, String label, String[] args) {
|
||||||
if (args.length == 0) {
|
if (args.length == 1) {
|
||||||
return Bukkit.getOnlinePlayers()
|
return Bukkit.getOnlinePlayers()
|
||||||
.stream()
|
.stream()
|
||||||
.filter(p -> MissileWars.getTeam(p) != null)
|
.filter(p -> MissileWars.getTeam(p) != null)
|
||||||
@ -89,16 +89,7 @@ public class CommandInvite implements CommandExecutor, TabCompleter {
|
|||||||
.map(Player::getName)
|
.map(Player::getName)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
if (args.length != 1) {
|
return new ArrayList<>();
|
||||||
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());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren