mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +00:00
Start command refactor
This commit is contained in:
1 parent
39e0b25d46
commit
3e27f7c5b1
57 files changed
+728
-384
No files matched your search
@@ -10,7 +10,7 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class DelWarpCommand extends CommandBase implements TabCompletable {
|
||||
public class DelWarpCommand extends Command implements TabProvider {
|
||||
|
||||
protected DelWarpCommand(@NotNull HuskHomes implementor) {
|
||||
super("delwarp", Permission.COMMAND_DELETE_WARP, implementor);
|
||||
@@ -72,7 +72,7 @@ public class DelWarpCommand extends CommandBase implements TabCompletable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull List<String> onTabComplete(@NotNull String[] args, @Nullable OnlineUser user) {
|
||||
public @NotNull List<String> suggest(@NotNull String[] args, @Nullable OnlineUser user) {
|
||||
return args.length > 1 ? Collections.emptyList() : plugin.getCache().getWarps()
|
||||
.stream()
|
||||
.filter(s -> s.startsWith(args.length == 1 ? args[0] : ""))
|
||||
|
||||
Reference in new issue
Block a user