mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +00:00
feat: add ability to customise the home delimiter
This commit is contained in:
7 files changed
+33
-16
No files matched your search
@@ -40,8 +40,8 @@ public class PublicHomeCommand extends HomeCommand implements TabCompletable {
|
||||
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, null, 1));
|
||||
plugin.getCommand(PublicHomeListCommand.class).ifPresent(cmd -> cmd
|
||||
.showPublicHomeList(executor, null, 1));
|
||||
return;
|
||||
}
|
||||
super.execute(executor, args);
|
||||
@@ -51,7 +51,7 @@ public class PublicHomeCommand extends HomeCommand implements TabCompletable {
|
||||
@NotNull
|
||||
public List<String> suggest(@NotNull CommandUser executor, @NotNull String[] args) {
|
||||
if (args.length <= 2) {
|
||||
if (args.length >= 1 && args[0].contains(Home.IDENTIFIER_DELIMITER)) {
|
||||
if (args.length >= 1 && args[0].contains(Home.getDelimiter())) {
|
||||
return plugin.getManager().homes().getPublicHomeIdentifierNames();
|
||||
}
|
||||
return plugin.getManager().homes().getPublicHomeNames();
|
||||
|
||||
Reference in new issue
Block a user