mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 22:16:08 +00:00
Finish fixing TAB completion via console
This commit is contained in:
1 parent
16206b72eb
commit
32f05de853
15 files changed
+42
-22
No files matched your search
@@ -4,6 +4,7 @@ import net.william278.huskhomes.HuskHomes;
|
||||
import net.william278.huskhomes.player.OnlineUser;
|
||||
import net.william278.huskhomes.util.Permission;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -35,7 +36,7 @@ public class WarpCommand extends CommandBase implements TabCompletable, ConsoleE
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull List<String> onTabComplete(@NotNull OnlineUser onlineUser, @NotNull String[] args) {
|
||||
public @NotNull List<String> onTabComplete(@NotNull String[] args, @Nullable OnlineUser user) {
|
||||
return plugin.getCache().warps.stream()
|
||||
.filter(s -> s.toLowerCase().startsWith(args.length >= 1 ? args[0].toLowerCase() : ""))
|
||||
.sorted().collect(Collectors.toList());
|
||||
|
||||
Reference in new issue
Block a user