Fix CommandInvite TabCompleter
Dieser Commit ist enthalten in:
Ursprung
a6293e163d
Commit
14b68fa45a
@ -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