List commands, more refactoring work

This commit is contained in:
William278 committed 2023-03-17 17:00:44 +00:00
1 parent 9903503f03
commit f746d67339
23 files changed
+361 -450

No files matched your search

@@ -12,6 +12,17 @@ public class PublicHomeCommand extends HomeCommand {
super("phome", List.of("publichome"), plugin);
}
@Override
public void execute(@NotNull CommandUser executor, @NotNull String[] args) {
// Display the public home list if no arguments are provided
if (args.length == 0) {
plugin.getCommand(PublicHomeListCommand.class)
.ifPresent(command -> command.showPublicHomeList(executor, 1));
return;
}
super.execute(executor, args);
}
@Override
@NotNull
public List<String> suggest(@NotNull CommandUser executor, @NotNull String[] args) {