fixed player name tab completing with capitalized names
This commit is contained in:
@@ -76,11 +76,11 @@ public class CommandManager implements CommandExecutor, TabExecutor {
|
|||||||
.filter(subCommand -> commandSender.hasPermission(subCommand.getPermission()))
|
.filter(subCommand -> commandSender.hasPermission(subCommand.getPermission()))
|
||||||
.map(SubCommand::getName)
|
.map(SubCommand::getName)
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
.filter(name -> args.length == 0 || name.startsWith(args[0]))
|
.filter(name -> args.length == 0 || name.startsWith(args[0].toLowerCase()))
|
||||||
.collect(Collectors.toList()));
|
.collect(Collectors.toList()));
|
||||||
res.addAll(Bukkit.getOnlinePlayers().stream()
|
res.addAll(Bukkit.getOnlinePlayers().stream()
|
||||||
.map(Player::getName)
|
.map(Player::getName)
|
||||||
.filter(name -> args.length == 0 || name.startsWith(args[0]))
|
.filter(name -> args.length == 0 || name.startsWith(args[0].toLowerCase()))
|
||||||
.collect(Collectors.toList()));
|
.collect(Collectors.toList()));
|
||||||
} else {
|
} else {
|
||||||
SubCommand subCommand = getSubCommand(args[0]);
|
SubCommand subCommand = getSubCommand(args[0]);
|
||||||
|
|||||||
Reference in New Issue
Block a user