mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +00:00
Fix TAB suggestion logic
This commit is contained in:
5 files changed
+10
-11
No files matched your search
@@ -7,7 +7,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public abstract class Command extends Node implements TabProvider {
|
||||
public abstract class Command extends Node {
|
||||
|
||||
private final String usage;
|
||||
|
||||
@@ -28,12 +28,6 @@ public abstract class Command extends Node implements TabProvider {
|
||||
|
||||
public abstract void execute(@NotNull CommandUser executor, @NotNull String[] args);
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public List<String> suggest(@NotNull CommandUser executor, @NotNull String[] args) {
|
||||
return List.of();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected String[] removeFirstArg(@NotNull String[] args) {
|
||||
String[] newArgs = new String[args.length - 1];
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class HuskHomesCommand extends Command {
|
||||
public class HuskHomesCommand extends Command implements TabProvider {
|
||||
|
||||
private static final List<String> SUB_COMMANDS = List.of("about", "help", "reload", "update");
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class PublicHomeCommand extends HomeCommand {
|
||||
public class PublicHomeCommand extends HomeCommand implements TabProvider {
|
||||
|
||||
protected PublicHomeCommand(@NotNull HuskHomes plugin) {
|
||||
super("phome", List.of("publichome"), plugin);
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
public abstract class SavedPositionCommand<T extends SavedPosition> extends Command {
|
||||
public abstract class SavedPositionCommand<T extends SavedPosition> extends Command implements TabProvider {
|
||||
|
||||
private final Class<T> positionType;
|
||||
protected final List<String> arguments;
|
||||
|
||||
Reference in new issue
Block a user