Continue command refactor work

This commit is contained in:
William committed 2023-03-07 15:17:20 +00:00
1 parent 3e27f7c5b1
commit 0bd63a9f01
31 files changed
+319 -391

No files matched your search

@@ -51,7 +51,8 @@ public class TpaHereCommand extends Command implements TabProvider {
}
@Override
public @NotNull List<String> suggest(@NotNull String[] args, @Nullable OnlineUser user) {
@NotNull
public final List<String> suggest(@NotNull CommandUser user, @NotNull String[] args) {
return args.length <= 1 ? plugin.getCache().getPlayers().stream()
.filter(s -> s.toLowerCase().startsWith(args.length == 1 ? args[0].toLowerCase() : ""))
.sorted().collect(Collectors.toList()) : Collections.emptyList();