This commit is contained in:
parent
7cc9395cbc
commit
1380e7479a
11 changed files with 45 additions and 77 deletions
|
@ -133,12 +133,19 @@ public class ResetAdventureCommand implements TabExecutor {
|
|||
if (args[0].isBlank()) {
|
||||
return Arrays.stream(Bukkit.getOfflinePlayers())
|
||||
.map(OfflinePlayer::getName)
|
||||
.toList().stream().limit(10).toList();
|
||||
.toList()
|
||||
.stream()
|
||||
.limit(10)
|
||||
.toList();
|
||||
}
|
||||
return Arrays.stream(Bukkit.getOfflinePlayers())
|
||||
.map(OfflinePlayer::getName).filter(Objects::nonNull)
|
||||
.map(OfflinePlayer::getName)
|
||||
.filter(Objects::nonNull)
|
||||
.filter(name -> name.toLowerCase().startsWith(args[0].toLowerCase()))
|
||||
.toList().stream().limit(10).toList();
|
||||
.toList()
|
||||
.stream()
|
||||
.limit(10)
|
||||
.toList();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue