Start command refactor

This commit is contained in:
William278 committed 2023-03-05 19:10:19 +00:00
1 parent 39e0b25d46
commit 3e27f7c5b1
57 files changed
+728 -384

No files matched your search

@@ -14,7 +14,7 @@ import java.util.*;
import java.util.logging.Level;
import java.util.stream.Collectors;
public class TpCommand extends CommandBase implements TabCompletable, ConsoleExecutable {
public class TpCommand extends Command implements TabProvider, ConsoleExecutable {
protected TpCommand(@NotNull HuskHomes implementor) {
super("tp", Permission.COMMAND_TP, implementor, "tpo");
@@ -203,7 +203,7 @@ public class TpCommand extends CommandBase implements TabCompletable, ConsoleExe
}
@Override
public @NotNull List<String> onTabComplete(@NotNull String[] args, @Nullable OnlineUser user) {
public @NotNull List<String> suggest(@NotNull String[] args, @Nullable OnlineUser user) {
final boolean serveCoordinateCompletions = user != null && user.hasPermission(Permission.COMMAND_TP_TO_COORDINATES.node);
switch (args.length) {
case 0, 1 -> {