mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 22:16:08 +00:00
Prevent home command tab completion throwing exceptions for un-cached users
This commit is contained in:
1 parent
3232a38b63
commit
4832d69131
7 files changed
+35
-17
No files matched your search
@@ -76,8 +76,10 @@ public class DelWarpCommand extends CommandBase implements TabCompletable {
|
||||
|
||||
@Override
|
||||
public @NotNull List<String> onTabComplete(@NotNull String[] args, @Nullable OnlineUser user) {
|
||||
return args.length > 1 ? Collections.emptyList() : plugin.getCache().warps.stream()
|
||||
return args.length > 1 ? Collections.emptyList() : plugin.getCache().warps
|
||||
.stream()
|
||||
.filter(s -> s.startsWith(args.length == 1 ? args[0] : ""))
|
||||
.sorted().collect(Collectors.toList());
|
||||
.sorted()
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user