mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 22:16:08 +00:00
feat: allow /phome <name> on uniquely named homes
If multiple public homes with the same name exist, typing /phome (name) will bring up a filtered public home list containing the list of public homes with that name for you to click on. The username-prefixed name will also be the only one to show up in TAB. This commit also fixes a bug with home/warp lists showing a blank description on hover instead of `(none)`.
This commit is contained in:
32 files changed
+353
-81
No files matched your search
@@ -243,6 +243,27 @@ public abstract class Database {
|
||||
*/
|
||||
public abstract List<Home> getPublicHomes();
|
||||
|
||||
/**
|
||||
* Get a list of publicly-set {@link Home}s with a specific name.
|
||||
*
|
||||
* @param name The name of the home
|
||||
* @param caseInsensitive Whether the name lookup query should be case-insensitive
|
||||
* @return A list containing all publicly-set {@link Home}s with the specified name
|
||||
*/
|
||||
public abstract List<Home> getPublicHomes(@NotNull String name, boolean caseInsensitive);
|
||||
|
||||
/**
|
||||
* Get a list of publicly-set {@link Home}s with a specific name.
|
||||
*
|
||||
* @param name The name of the home
|
||||
* @return A list containing all publicly-set {@link Home}s with the specified name
|
||||
* @apiNote Whether lookup is case-sensitive is determined by the {@code general.case_insensitive_names} setting
|
||||
*/
|
||||
public List<Home> getPublicHomes(@NotNull String name) {
|
||||
return getPublicHomes(name, plugin.getSettings().getGeneral().getNames().isCaseInsensitive());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get a list of publicly-set {@link Home}s on <i>this {@link Server server}</i>.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user