Exclude vanished players from tab complete list

Part 2 of fixing #1745
This commit is contained in:
TfT_02
2014-02-28 21:55:32 +01:00
parent 53fdf750f4
commit e56d5a0454
14 changed files with 48 additions and 30 deletions

View File

@@ -45,7 +45,7 @@ public class McremoveCommand implements TabExecutor {
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
switch (args.length) {
case 1:
Set<String> playerNames = UserManager.getPlayerNames();
List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
default:
return ImmutableList.of();