mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-03 22:16:34 +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
@@ -31,7 +31,7 @@ import java.util.List;
|
|||||||
public class DelHomeCommand extends SavedPositionCommand<Home> {
|
public class DelHomeCommand extends SavedPositionCommand<Home> {
|
||||||
|
|
||||||
public DelHomeCommand(@NotNull HuskHomes plugin) {
|
public DelHomeCommand(@NotNull HuskHomes plugin) {
|
||||||
super("delhome", List.of(), Home.class, List.of(), plugin);
|
super("delhome", List.of(), PositionCommandType.HOME, List.of(), plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import java.util.List;
|
|||||||
public class DelWarpCommand extends SavedPositionCommand<Warp> {
|
public class DelWarpCommand extends SavedPositionCommand<Warp> {
|
||||||
|
|
||||||
public DelWarpCommand(@NotNull HuskHomes plugin) {
|
public DelWarpCommand(@NotNull HuskHomes plugin) {
|
||||||
super("delwarp", List.of(), Warp.class, List.of(), plugin);
|
super("delwarp", List.of(), PositionCommandType.WARP, List.of(), plugin);
|
||||||
setOperatorCommand(true);
|
setOperatorCommand(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,13 @@ import java.util.regex.Pattern;
|
|||||||
public class EditHomeCommand extends SavedPositionCommand<Home> {
|
public class EditHomeCommand extends SavedPositionCommand<Home> {
|
||||||
|
|
||||||
public EditHomeCommand(@NotNull HuskHomes plugin) {
|
public EditHomeCommand(@NotNull HuskHomes plugin) {
|
||||||
super("edithome", List.of(), Home.class, List.of("rename", "description", "relocate", "privacy"), plugin);
|
super(
|
||||||
|
"edithome",
|
||||||
|
List.of(),
|
||||||
|
PositionCommandType.HOME,
|
||||||
|
List.of("rename", "description", "relocate", "privacy"),
|
||||||
|
plugin
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -37,7 +37,13 @@ import java.util.regex.Pattern;
|
|||||||
public class EditWarpCommand extends SavedPositionCommand<Warp> {
|
public class EditWarpCommand extends SavedPositionCommand<Warp> {
|
||||||
|
|
||||||
public EditWarpCommand(@NotNull HuskHomes plugin) {
|
public EditWarpCommand(@NotNull HuskHomes plugin) {
|
||||||
super("editwarp", List.of(), Warp.class, List.of("rename", "description", "relocate"), plugin);
|
super(
|
||||||
|
"editwarp",
|
||||||
|
List.of(),
|
||||||
|
PositionCommandType.WARP,
|
||||||
|
List.of("rename", "description", "relocate"),
|
||||||
|
plugin
|
||||||
|
);
|
||||||
setOperatorCommand(true);
|
setOperatorCommand(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,8 +32,9 @@ import java.util.Optional;
|
|||||||
|
|
||||||
public abstract class HomeCommand extends SavedPositionCommand<Home> {
|
public abstract class HomeCommand extends SavedPositionCommand<Home> {
|
||||||
|
|
||||||
protected HomeCommand(@NotNull String name, @NotNull List<String> aliases, @NotNull HuskHomes plugin) {
|
protected HomeCommand(@NotNull String name, @NotNull List<String> aliases, @NotNull PositionCommandType type,
|
||||||
super(name, aliases, Home.class, List.of("player"), plugin);
|
@NotNull HuskHomes plugin) {
|
||||||
|
super(name, aliases, type, List.of("player"), plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -109,13 +109,17 @@ public class HomeListCommand extends ListCommand {
|
|||||||
final PaginatedList homeList = PaginatedList.of(homes.stream().map(home ->
|
final PaginatedList homeList = PaginatedList.of(homes.stream().map(home ->
|
||||||
plugin.getLocales()
|
plugin.getLocales()
|
||||||
.getRawLocale("home_list_item",
|
.getRawLocale("home_list_item",
|
||||||
Locales.escapeText(home.getName()), home.getSafeIdentifier(),
|
Locales.escapeText(home.getName()),
|
||||||
|
home.getSafeIdentifier(),
|
||||||
home.isPublic()
|
home.isPublic()
|
||||||
? plugin.getLocales().getRawLocale("home_is_public")
|
? plugin.getLocales().getRawLocale("home_is_public")
|
||||||
.orElse("Public")
|
.orElse("Public")
|
||||||
: plugin.getLocales().getRawLocale("home_is_private")
|
: plugin.getLocales().getRawLocale("home_is_private")
|
||||||
.orElse("Private"),
|
.orElse("Private"),
|
||||||
Locales.escapeText(home.getMeta().getDescription()))
|
home.getMeta().getDescription().isBlank()
|
||||||
|
? plugin.getLocales().getNone()
|
||||||
|
: Locales.escapeText(home.getMeta().getDescription())
|
||||||
|
)
|
||||||
.orElse(home.getName())).sorted().collect(Collectors.toList()),
|
.orElse(home.getName())).sorted().collect(Collectors.toList()),
|
||||||
plugin.getLocales()
|
plugin.getLocales()
|
||||||
.getBaseList(plugin.getSettings().getGeneral().getListItemsPerPage())
|
.getBaseList(plugin.getSettings().getGeneral().getListItemsPerPage())
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import java.util.List;
|
|||||||
public class PrivateHomeCommand extends HomeCommand {
|
public class PrivateHomeCommand extends HomeCommand {
|
||||||
|
|
||||||
protected PrivateHomeCommand(@NotNull HuskHomes plugin) {
|
protected PrivateHomeCommand(@NotNull HuskHomes plugin) {
|
||||||
super("home", List.of(), plugin);
|
super("home", List.of(), PositionCommandType.HOME, plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
package net.william278.huskhomes.command;
|
package net.william278.huskhomes.command;
|
||||||
|
|
||||||
import net.william278.huskhomes.HuskHomes;
|
import net.william278.huskhomes.HuskHomes;
|
||||||
|
import net.william278.huskhomes.position.Home;
|
||||||
import net.william278.huskhomes.user.CommandUser;
|
import net.william278.huskhomes.user.CommandUser;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
@@ -28,7 +29,7 @@ import java.util.List;
|
|||||||
public class PublicHomeCommand extends HomeCommand implements TabProvider {
|
public class PublicHomeCommand extends HomeCommand implements TabProvider {
|
||||||
|
|
||||||
protected PublicHomeCommand(@NotNull HuskHomes plugin) {
|
protected PublicHomeCommand(@NotNull HuskHomes plugin) {
|
||||||
super("phome", List.of("publichome"), plugin);
|
super("phome", List.of("publichome"), PositionCommandType.PUBLIC_HOME, plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -36,7 +37,7 @@ public class PublicHomeCommand extends HomeCommand implements TabProvider {
|
|||||||
// Display the public home list if no arguments are provided
|
// Display the public home list if no arguments are provided
|
||||||
if (args.length == 0) {
|
if (args.length == 0) {
|
||||||
plugin.getCommand(PublicHomeListCommand.class)
|
plugin.getCommand(PublicHomeListCommand.class)
|
||||||
.ifPresent(command -> command.showPublicHomeList(executor, 1));
|
.ifPresent(command -> command.showPublicHomeList(executor, null, 1));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
super.execute(executor, args);
|
super.execute(executor, args);
|
||||||
@@ -46,7 +47,10 @@ public class PublicHomeCommand extends HomeCommand implements TabProvider {
|
|||||||
@NotNull
|
@NotNull
|
||||||
public List<String> suggest(@NotNull CommandUser executor, @NotNull String[] args) {
|
public List<String> suggest(@NotNull CommandUser executor, @NotNull String[] args) {
|
||||||
if (args.length <= 2) {
|
if (args.length <= 2) {
|
||||||
return filter(plugin.getManager().homes().getPublicHomeIdentifiers(), args);
|
if (args.length >= 1 && args[0].contains(Home.IDENTIFIER_DELIMITER)) {
|
||||||
|
return plugin.getManager().homes().getPublicHomeIdentifierNames();
|
||||||
|
}
|
||||||
|
return plugin.getManager().homes().getPublicHomeNames();
|
||||||
}
|
}
|
||||||
return List.of();
|
return List.of();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import net.william278.huskhomes.user.CommandUser;
|
|||||||
import net.william278.huskhomes.user.OnlineUser;
|
import net.william278.huskhomes.user.OnlineUser;
|
||||||
import net.william278.paginedown.PaginatedList;
|
import net.william278.paginedown.PaginatedList;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
@@ -40,19 +41,20 @@ public class PublicHomeListCommand extends ListCommand {
|
|||||||
@Override
|
@Override
|
||||||
public void execute(@NotNull CommandUser executor, @NotNull String[] args) {
|
public void execute(@NotNull CommandUser executor, @NotNull String[] args) {
|
||||||
final int pageNumber = parseIntArg(args, 0).orElse(1);
|
final int pageNumber = parseIntArg(args, 0).orElse(1);
|
||||||
this.showPublicHomeList(executor, pageNumber);
|
this.showPublicHomeList(executor, null, pageNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void showPublicHomeList(@NotNull CommandUser executor, int pageNumber) {
|
public void showPublicHomeList(@NotNull CommandUser executor, @Nullable String nameFilter, int pageNumber) {
|
||||||
if (executor instanceof OnlineUser user && cachedLists.containsKey(user.getUuid())) {
|
if (nameFilter == null && executor instanceof OnlineUser user && cachedLists.containsKey(user.getUuid())) {
|
||||||
executor.sendMessage(cachedLists.get(user.getUuid()).getNearestValidPage(pageNumber));
|
executor.sendMessage(cachedLists.get(user.getUuid()).getNearestValidPage(pageNumber));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final List<Home> homes = plugin.getDatabase().getPublicHomes();
|
final List<Home> homes = nameFilter == null ? plugin.getDatabase().getPublicHomes()
|
||||||
|
: plugin.getDatabase().getPublicHomes(nameFilter);
|
||||||
plugin.fireEvent(plugin.getViewHomeListEvent(homes, executor, true),
|
plugin.fireEvent(plugin.getViewHomeListEvent(homes, executor, true),
|
||||||
(event) -> this.generateList(executor, event.getHomes()).ifPresent(homeList -> {
|
(event) -> this.generateList(executor, event.getHomes()).ifPresent(homeList -> {
|
||||||
if (executor instanceof OnlineUser onlineUser) {
|
if (nameFilter == null && executor instanceof OnlineUser onlineUser) {
|
||||||
cachedLists.put(onlineUser.getUuid(), homeList);
|
cachedLists.put(onlineUser.getUuid(), homeList);
|
||||||
}
|
}
|
||||||
executor.sendMessage(homeList.getNearestValidPage(pageNumber));
|
executor.sendMessage(homeList.getNearestValidPage(pageNumber));
|
||||||
@@ -69,9 +71,15 @@ public class PublicHomeListCommand extends ListCommand {
|
|||||||
final PaginatedList homeList = PaginatedList.of(publicHomes.stream().map(home ->
|
final PaginatedList homeList = PaginatedList.of(publicHomes.stream().map(home ->
|
||||||
plugin.getLocales()
|
plugin.getLocales()
|
||||||
.getRawLocale("public_home_list_item",
|
.getRawLocale("public_home_list_item",
|
||||||
Locales.escapeText(home.getName()), home.getSafeIdentifier(),
|
publicHomes.stream()
|
||||||
|
.filter(h -> h.getName().equals(home.getName())).count() > 1
|
||||||
|
? home.getSafeIdentifier() : Locales.escapeText(home.getName()),
|
||||||
|
home.getSafeIdentifier(),
|
||||||
Locales.escapeText(home.getOwner().getUsername()),
|
Locales.escapeText(home.getOwner().getUsername()),
|
||||||
Locales.escapeText(home.getMeta().getDescription()))
|
home.getMeta().getDescription().isBlank()
|
||||||
|
? plugin.getLocales().getNone()
|
||||||
|
: Locales.escapeText(home.getMeta().getDescription())
|
||||||
|
)
|
||||||
.orElse(home.getName())).sorted().collect(Collectors.toList()),
|
.orElse(home.getName())).sorted().collect(Collectors.toList()),
|
||||||
plugin.getLocales()
|
plugin.getLocales()
|
||||||
.getBaseList(plugin.getSettings().getGeneral().getListItemsPerPage())
|
.getBaseList(plugin.getSettings().getGeneral().getListItemsPerPage())
|
||||||
|
|||||||
@@ -35,10 +35,11 @@ import java.util.*;
|
|||||||
|
|
||||||
public abstract class SavedPositionCommand<T extends SavedPosition> extends Command implements TabProvider {
|
public abstract class SavedPositionCommand<T extends SavedPosition> extends Command implements TabProvider {
|
||||||
|
|
||||||
private final Class<T> positionType;
|
|
||||||
protected final List<String> arguments;
|
protected final List<String> arguments;
|
||||||
|
protected final PositionCommandType positionType;
|
||||||
|
|
||||||
protected SavedPositionCommand(@NotNull String name, @NotNull List<String> aliases, @NotNull Class<T> positionType,
|
protected SavedPositionCommand(@NotNull String name, @NotNull List<String> aliases,
|
||||||
|
@NotNull PositionCommandType positionType,
|
||||||
@NotNull List<String> arguments, @NotNull HuskHomes plugin) {
|
@NotNull List<String> arguments, @NotNull HuskHomes plugin) {
|
||||||
super(name, aliases, "<name>" + formatUsage(arguments), plugin);
|
super(name, aliases, "<name>" + formatUsage(arguments), plugin);
|
||||||
this.positionType = positionType;
|
this.positionType = positionType;
|
||||||
@@ -50,7 +51,10 @@ public abstract class SavedPositionCommand<T extends SavedPosition> extends Comm
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public String getOtherPermission() {
|
public String getOtherPermission() {
|
||||||
return (positionType == Home.class ? super.getPermission("other") : super.getPermission());
|
if (positionType != PositionCommandType.WARP) {
|
||||||
|
return super.getPermission("other");
|
||||||
|
}
|
||||||
|
return super.getPermission("warp");
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@@ -63,9 +67,10 @@ public abstract class SavedPositionCommand<T extends SavedPosition> extends Comm
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Optional<?> position = (positionType == Home.class
|
// Resolve and execute
|
||||||
? resolveHome(executor, name.get())
|
final Optional<?> position = (positionType == PositionCommandType.WARP
|
||||||
: resolveWarp(executor, name.get()));
|
? resolveWarp(executor, name.get()) // Resolve warps
|
||||||
|
: resolveHome(executor, name.get())); // Resolve homes & public homes
|
||||||
position.ifPresent(p -> execute(executor, (T) p, removeFirstArg(args)));
|
position.ifPresent(p -> execute(executor, (T) p, removeFirstArg(args)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,45 +78,68 @@ public abstract class SavedPositionCommand<T extends SavedPosition> extends Comm
|
|||||||
|
|
||||||
private Optional<Home> resolveHome(@NotNull CommandUser executor, @NotNull String homeName) {
|
private Optional<Home> resolveHome(@NotNull CommandUser executor, @NotNull String homeName) {
|
||||||
if (homeName.contains(Home.IDENTIFIER_DELIMITER)) {
|
if (homeName.contains(Home.IDENTIFIER_DELIMITER)) {
|
||||||
final String ownerUsername = homeName.substring(0, homeName.indexOf(Home.IDENTIFIER_DELIMITER));
|
return resolveDelimitedHome(executor, homeName);
|
||||||
final String ownerHome = homeName.substring(homeName.indexOf(Home.IDENTIFIER_DELIMITER) + 1);
|
} else if (positionType == PositionCommandType.PUBLIC_HOME) {
|
||||||
if (ownerUsername.isBlank() || ownerHome.isBlank()) {
|
return resolvePublicHome(executor, homeName);
|
||||||
plugin.getLocales().getLocale("error_invalid_syntax", getUsage())
|
|
||||||
.ifPresent(executor::sendMessage);
|
|
||||||
return Optional.empty();
|
|
||||||
}
|
|
||||||
|
|
||||||
final Optional<Home> optionalHome = plugin.getDatabase().getUserDataByName(ownerUsername)
|
|
||||||
.flatMap(owner -> resolveHomeByName(owner.getUser(), ownerHome));
|
|
||||||
if (optionalHome.isEmpty()) {
|
|
||||||
plugin.getLocales().getLocale(executor.hasPermission(getOtherPermission())
|
|
||||||
? "error_home_invalid_other" : "error_public_home_invalid", ownerUsername, ownerHome)
|
|
||||||
.ifPresent(executor::sendMessage);
|
|
||||||
return Optional.empty();
|
|
||||||
}
|
|
||||||
|
|
||||||
final Home home = optionalHome.get();
|
|
||||||
if (executor instanceof OnlineUser user && !home.isPublic() && !user.equals(home.getOwner())
|
|
||||||
&& !user.hasPermission(getOtherPermission())) {
|
|
||||||
plugin.getLocales().getLocale("error_public_home_invalid", ownerUsername, ownerHome)
|
|
||||||
.ifPresent(executor::sendMessage);
|
|
||||||
return Optional.empty();
|
|
||||||
}
|
|
||||||
|
|
||||||
return optionalHome;
|
|
||||||
} else if (executor instanceof OnlineUser owner) {
|
} else if (executor instanceof OnlineUser owner) {
|
||||||
final Optional<Home> optionalHome = resolveHomeByName(owner, homeName);
|
return resolveOwnerHome(owner, homeName);
|
||||||
if (optionalHome.isEmpty()) {
|
}
|
||||||
plugin.getLocales().getLocale("error_home_invalid", homeName)
|
plugin.getLocales().getLocale("error_invalid_syntax", getUsage())
|
||||||
.ifPresent(executor::sendMessage);
|
.ifPresent(executor::sendMessage);
|
||||||
return Optional.empty();
|
return Optional.empty();
|
||||||
}
|
}
|
||||||
return optionalHome;
|
|
||||||
} else {
|
private Optional<Home> resolveDelimitedHome(@NotNull CommandUser executor, @NotNull String homeName) {
|
||||||
|
final String ownerUsername = homeName.substring(0, homeName.indexOf(Home.IDENTIFIER_DELIMITER));
|
||||||
|
final String ownerHome = homeName.substring(homeName.indexOf(Home.IDENTIFIER_DELIMITER) + 1);
|
||||||
|
if (ownerUsername.isBlank() || ownerHome.isBlank()) {
|
||||||
plugin.getLocales().getLocale("error_invalid_syntax", getUsage())
|
plugin.getLocales().getLocale("error_invalid_syntax", getUsage())
|
||||||
.ifPresent(executor::sendMessage);
|
.ifPresent(executor::sendMessage);
|
||||||
return Optional.empty();
|
return Optional.empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Optional<Home> optionalHome = plugin.getDatabase().getUserDataByName(ownerUsername)
|
||||||
|
.flatMap(owner -> resolveHomeByName(owner.getUser(), ownerHome));
|
||||||
|
if (optionalHome.isEmpty()) {
|
||||||
|
plugin.getLocales().getLocale(executor.hasPermission(getOtherPermission())
|
||||||
|
? "error_home_invalid_other" : "error_public_home_invalid", ownerUsername, ownerHome)
|
||||||
|
.ifPresent(executor::sendMessage);
|
||||||
|
return Optional.empty();
|
||||||
|
}
|
||||||
|
|
||||||
|
final Home home = optionalHome.get();
|
||||||
|
if (executor instanceof OnlineUser user && !home.isPublic() && !user.equals(home.getOwner())
|
||||||
|
&& !user.hasPermission(getOtherPermission())) {
|
||||||
|
plugin.getLocales().getLocale("error_public_home_invalid", ownerUsername, ownerHome)
|
||||||
|
.ifPresent(executor::sendMessage);
|
||||||
|
return Optional.empty();
|
||||||
|
}
|
||||||
|
return optionalHome;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Optional<Home> resolvePublicHome(@NotNull CommandUser executor, @NotNull String homeName) {
|
||||||
|
final List<Home> publicHomes = plugin.getDatabase().getPublicHomes(homeName);
|
||||||
|
if (publicHomes.isEmpty()) {
|
||||||
|
plugin.getLocales().getLocale("error_unknown_public_home", homeName)
|
||||||
|
.ifPresent(executor::sendMessage);
|
||||||
|
return Optional.empty();
|
||||||
|
}
|
||||||
|
if (publicHomes.size() > 1) {
|
||||||
|
plugin.getCommand(PublicHomeListCommand.class)
|
||||||
|
.ifPresent(command -> command.showPublicHomeList(executor, homeName, 1));
|
||||||
|
return Optional.empty();
|
||||||
|
}
|
||||||
|
return publicHomes.stream().findFirst();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Optional<Home> resolveOwnerHome(@NotNull OnlineUser owner, @NotNull String homeName) {
|
||||||
|
final Optional<Home> optionalHome = resolveHomeByName(owner, homeName);
|
||||||
|
if (optionalHome.isEmpty()) {
|
||||||
|
plugin.getLocales().getLocale("error_home_invalid", homeName)
|
||||||
|
.ifPresent(owner::sendMessage);
|
||||||
|
return Optional.empty();
|
||||||
|
}
|
||||||
|
return optionalHome;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Optional<Home> resolveHomeByName(@NotNull User owner, @NotNull String homeName) {
|
private Optional<Home> resolveHomeByName(@NotNull User owner, @NotNull String homeName) {
|
||||||
@@ -191,14 +219,23 @@ public abstract class SavedPositionCommand<T extends SavedPosition> extends Comm
|
|||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public List<String> suggest(@NotNull CommandUser executor, @NotNull String[] args) {
|
public List<String> suggest(@NotNull CommandUser executor, @NotNull String[] args) {
|
||||||
if (positionType != Home.class) {
|
return switch (positionType) {
|
||||||
return switch (args.length) {
|
case HOME, PUBLIC_HOME -> suggestHome(executor, args);
|
||||||
case 0, 1 -> plugin.getManager().warps().getUsableWarps(executor);
|
case WARP -> suggestWarp(executor, args);
|
||||||
case 2 -> arguments.stream().filter(a -> executor.hasPermission(getPermission(a))).toList();
|
};
|
||||||
default -> List.of();
|
}
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
private List<String> suggestWarp(@NotNull CommandUser executor, @NotNull String[] args) {
|
||||||
|
return switch (args.length) {
|
||||||
|
case 0, 1 -> plugin.getManager().warps().getUsableWarps(executor);
|
||||||
|
case 2 -> arguments.stream().filter(a -> executor.hasPermission(getPermission(a))).toList();
|
||||||
|
default -> List.of();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
private List<String> suggestHome(@NotNull CommandUser executor, @NotNull String[] args) {
|
||||||
return switch (args.length) {
|
return switch (args.length) {
|
||||||
case 0, 1 -> {
|
case 0, 1 -> {
|
||||||
if (args.length == 1 && args[0].contains(Home.IDENTIFIER_DELIMITER)) {
|
if (args.length == 1 && args[0].contains(Home.IDENTIFIER_DELIMITER)) {
|
||||||
@@ -217,4 +254,10 @@ public abstract class SavedPositionCommand<T extends SavedPosition> extends Comm
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected enum PositionCommandType {
|
||||||
|
HOME,
|
||||||
|
PUBLIC_HOME,
|
||||||
|
WARP,
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -32,7 +32,7 @@ import java.util.Optional;
|
|||||||
public class WarpCommand extends SavedPositionCommand<Warp> {
|
public class WarpCommand extends SavedPositionCommand<Warp> {
|
||||||
|
|
||||||
protected WarpCommand(@NotNull HuskHomes plugin) {
|
protected WarpCommand(@NotNull HuskHomes plugin) {
|
||||||
super("warp", List.of(), Warp.class, List.of("player"), plugin);
|
super("warp", List.of(), PositionCommandType.WARP, List.of("player"), plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -69,8 +69,11 @@ public class WarpListCommand extends ListCommand {
|
|||||||
final PaginatedList warpList = PaginatedList.of(warps.stream().map(warp ->
|
final PaginatedList warpList = PaginatedList.of(warps.stream().map(warp ->
|
||||||
plugin.getLocales()
|
plugin.getLocales()
|
||||||
.getRawLocale("warp_list_item",
|
.getRawLocale("warp_list_item",
|
||||||
Locales.escapeText(warp.getName()), warp.getSafeIdentifier(),
|
Locales.escapeText(warp.getName()),
|
||||||
Locales.escapeText(warp.getMeta().getDescription())
|
warp.getSafeIdentifier(),
|
||||||
|
warp.getMeta().getDescription().isBlank()
|
||||||
|
? plugin.getLocales().getNone()
|
||||||
|
: Locales.escapeText(warp.getMeta().getDescription())
|
||||||
)
|
)
|
||||||
.orElse(warp.getName())).sorted().collect(Collectors.toList()),
|
.orElse(warp.getName())).sorted().collect(Collectors.toList()),
|
||||||
plugin.getLocales()
|
plugin.getLocales()
|
||||||
|
|||||||
@@ -243,6 +243,27 @@ public abstract class Database {
|
|||||||
*/
|
*/
|
||||||
public abstract List<Home> getPublicHomes();
|
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>.
|
* Get a list of publicly-set {@link Home}s on <i>this {@link Server server}</i>.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -296,19 +296,19 @@ public class H2Database extends Database {
|
|||||||
try (Connection connection = getConnection()) {
|
try (Connection connection = getConnection()) {
|
||||||
// Delete Position
|
// Delete Position
|
||||||
PreparedStatement statement = connection.prepareStatement(formatStatementTables("""
|
PreparedStatement statement = connection.prepareStatement(formatStatementTables("""
|
||||||
DELETE FROM `%positions_table%`
|
DELETE FROM `%positions_table%`
|
||||||
WHERE `id`
|
WHERE `id`
|
||||||
IN ((SELECT `last_position` FROM `%players_table%` WHERE `uuid` = ?),
|
IN ((SELECT `last_position` FROM `%players_table%` WHERE `uuid` = ?),
|
||||||
(SELECT `offline_position` FROM `%players_table%` WHERE `uuid` = ?),
|
(SELECT `offline_position` FROM `%players_table%` WHERE `uuid` = ?),
|
||||||
(SELECT `respawn_position` FROM `%players_table%` WHERE `uuid` = ?));"""));
|
(SELECT `respawn_position` FROM `%players_table%` WHERE `uuid` = ?));"""));
|
||||||
statement.setString(1, uuid.toString());
|
statement.setString(1, uuid.toString());
|
||||||
statement.setString(2, uuid.toString());
|
statement.setString(2, uuid.toString());
|
||||||
statement.setString(3, uuid.toString());
|
statement.setString(3, uuid.toString());
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
|
|
||||||
statement = connection.prepareStatement(formatStatementTables("""
|
statement = connection.prepareStatement(formatStatementTables("""
|
||||||
DELETE FROM `%players_table%`
|
DELETE FROM `%players_table%`
|
||||||
WHERE `uuid`=?;"""));
|
WHERE `uuid`=?;"""));
|
||||||
statement.setString(1, uuid.toString());
|
statement.setString(1, uuid.toString());
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
|
|
||||||
@@ -498,6 +498,54 @@ public class H2Database extends Database {
|
|||||||
return userHomes;
|
return userHomes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Home> getPublicHomes(@NotNull String name, boolean caseInsensitive) {
|
||||||
|
final List<Home> userHomes = new ArrayList<>();
|
||||||
|
try (Connection connection = getConnection()) {
|
||||||
|
try (PreparedStatement statement = connection.prepareStatement(formatStatementTables("""
|
||||||
|
SELECT `%homes_table%`.`uuid` AS `home_uuid`, `owner_uuid`, `username` AS `owner_username`, `name`,
|
||||||
|
`description`, `tags`, `timestamp`, `x`, `y`, `z`, `yaw`, `pitch`, `world_name`, `world_uuid`,
|
||||||
|
`server_name`, `public`
|
||||||
|
FROM `%homes_table%`
|
||||||
|
INNER JOIN `%saved_positions_table%`
|
||||||
|
ON `%homes_table%`.`saved_position_id`=`%saved_positions_table%`.`id`
|
||||||
|
INNER JOIN `%positions_table`
|
||||||
|
ON `%saved_positions_table%`.`position_id`=`%positions_table%`.`id`
|
||||||
|
INNER JOIN `%players_table`
|
||||||
|
ON `%homes_table%`.`owner_uuid`=`%players_table%`.`uuid`
|
||||||
|
WHERE `public`=true
|
||||||
|
AND ((? AND UPPER(`name`) LIKE UPPER(?)) OR (`name`=?))
|
||||||
|
ORDER BY `name`;"""))) {
|
||||||
|
statement.setBoolean(1, caseInsensitive);
|
||||||
|
statement.setString(2, name);
|
||||||
|
statement.setString(3, name);
|
||||||
|
|
||||||
|
final ResultSet resultSet = statement.executeQuery();
|
||||||
|
while (resultSet.next()) {
|
||||||
|
userHomes.add(Home.from(resultSet.getDouble("x"),
|
||||||
|
resultSet.getDouble("y"),
|
||||||
|
resultSet.getDouble("z"),
|
||||||
|
resultSet.getFloat("yaw"),
|
||||||
|
resultSet.getFloat("pitch"),
|
||||||
|
World.from(resultSet.getString("world_name"),
|
||||||
|
UUID.fromString(resultSet.getString("world_uuid"))),
|
||||||
|
resultSet.getString("server_name"),
|
||||||
|
PositionMeta.from(resultSet.getString("name"),
|
||||||
|
resultSet.getString("description"),
|
||||||
|
resultSet.getTimestamp("timestamp").toInstant(),
|
||||||
|
resultSet.getString("tags")),
|
||||||
|
UUID.fromString(resultSet.getString("home_uuid")),
|
||||||
|
User.of(UUID.fromString(resultSet.getString("owner_uuid")),
|
||||||
|
resultSet.getString("owner_username")),
|
||||||
|
resultSet.getBoolean("public")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (SQLException e) {
|
||||||
|
plugin.log(Level.SEVERE, "Failed to query the database for public home data");
|
||||||
|
}
|
||||||
|
return userHomes;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Optional<Home> getHome(@NotNull User user, @NotNull String homeName, boolean caseInsensitive) {
|
public Optional<Home> getHome(@NotNull User user, @NotNull String homeName, boolean caseInsensitive) {
|
||||||
try (Connection connection = getConnection()) {
|
try (Connection connection = getConnection()) {
|
||||||
|
|||||||
@@ -552,6 +552,54 @@ public class MySqlDatabase extends Database {
|
|||||||
return userHomes;
|
return userHomes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Home> getPublicHomes(@NotNull String name, boolean caseInsensitive) {
|
||||||
|
final List<Home> userHomes = new ArrayList<>();
|
||||||
|
try (Connection connection = getConnection()) {
|
||||||
|
try (PreparedStatement statement = connection.prepareStatement(formatStatementTables("""
|
||||||
|
SELECT `%homes_table%`.`uuid` AS `home_uuid`, `owner_uuid`, `username` AS `owner_username`, `name`,
|
||||||
|
`description`, `tags`, `timestamp`, `x`, `y`, `z`, `yaw`, `pitch`, `world_name`, `world_uuid`,
|
||||||
|
`server_name`, `public`
|
||||||
|
FROM `%homes_table%`
|
||||||
|
INNER JOIN `%saved_positions_table%`
|
||||||
|
ON `%homes_table%`.`saved_position_id`=`%saved_positions_table%`.`id`
|
||||||
|
INNER JOIN `%positions_table%`
|
||||||
|
ON `%saved_positions_table%`.`position_id`=`%positions_table%`.`id`
|
||||||
|
INNER JOIN `%players_table%`
|
||||||
|
ON `%homes_table%`.`owner_uuid`=`%players_table%`.`uuid`
|
||||||
|
WHERE `public`=true
|
||||||
|
AND ((? AND UPPER(`name`) LIKE UPPER(?)) OR (`name`=?))
|
||||||
|
ORDER BY `name`;"""))) {
|
||||||
|
statement.setBoolean(1, caseInsensitive);
|
||||||
|
statement.setString(2, name);
|
||||||
|
statement.setString(3, name);
|
||||||
|
|
||||||
|
final ResultSet resultSet = statement.executeQuery();
|
||||||
|
while (resultSet.next()) {
|
||||||
|
userHomes.add(Home.from(resultSet.getDouble("x"),
|
||||||
|
resultSet.getDouble("y"),
|
||||||
|
resultSet.getDouble("z"),
|
||||||
|
resultSet.getFloat("yaw"),
|
||||||
|
resultSet.getFloat("pitch"),
|
||||||
|
World.from(resultSet.getString("world_name"),
|
||||||
|
UUID.fromString(resultSet.getString("world_uuid"))),
|
||||||
|
resultSet.getString("server_name"),
|
||||||
|
PositionMeta.from(resultSet.getString("name"),
|
||||||
|
resultSet.getString("description"),
|
||||||
|
resultSet.getTimestamp("timestamp").toInstant(),
|
||||||
|
resultSet.getString("tags")),
|
||||||
|
UUID.fromString(resultSet.getString("home_uuid")),
|
||||||
|
User.of(UUID.fromString(resultSet.getString("owner_uuid")),
|
||||||
|
resultSet.getString("owner_username")),
|
||||||
|
resultSet.getBoolean("public")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (SQLException e) {
|
||||||
|
plugin.log(Level.SEVERE, "Failed to query the database for public home data");
|
||||||
|
}
|
||||||
|
return userHomes;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Optional<Home> getHome(@NotNull User user, @NotNull String homeName, boolean caseInsensitive) {
|
public Optional<Home> getHome(@NotNull User user, @NotNull String homeName, boolean caseInsensitive) {
|
||||||
try (Connection connection = getConnection()) {
|
try (Connection connection = getConnection()) {
|
||||||
|
|||||||
@@ -514,6 +514,52 @@ public class SqLiteDatabase extends Database {
|
|||||||
return userHomes;
|
return userHomes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Home> getPublicHomes(@NotNull String name, boolean caseInsensitive) {
|
||||||
|
final List<Home> userHomes = new ArrayList<>();
|
||||||
|
try (PreparedStatement statement = getConnection().prepareStatement(formatStatementTables("""
|
||||||
|
SELECT `%homes_table%`.`uuid` AS `home_uuid`, `owner_uuid`, `username` AS `owner_username`,
|
||||||
|
`name`, `description`, `tags`, `timestamp`, `x`, `y`, `z`, `yaw`, `pitch`, `world_name`,
|
||||||
|
`world_uuid`, `server_name`, `public`
|
||||||
|
FROM `%homes_table%`
|
||||||
|
INNER JOIN `%saved_positions_table%`
|
||||||
|
ON `%homes_table%`.`saved_position_id`=`%saved_positions_table%`.`id`
|
||||||
|
INNER JOIN `%positions_table%`
|
||||||
|
ON `%saved_positions_table%`.`position_id`=`%positions_table%`.`id`
|
||||||
|
INNER JOIN `%players_table%`
|
||||||
|
ON `%homes_table%`.`owner_uuid`=`%players_table%`.`uuid`
|
||||||
|
WHERE `public`=true
|
||||||
|
AND ((? AND UPPER(`name`) LIKE UPPER(?)) OR (`name`=?))
|
||||||
|
ORDER BY `name`;"""))) {
|
||||||
|
statement.setBoolean(1, caseInsensitive);
|
||||||
|
statement.setString(2, name);
|
||||||
|
statement.setString(3, name);
|
||||||
|
|
||||||
|
final ResultSet resultSet = statement.executeQuery();
|
||||||
|
while (resultSet.next()) {
|
||||||
|
userHomes.add(Home.from(resultSet.getDouble("x"),
|
||||||
|
resultSet.getDouble("y"),
|
||||||
|
resultSet.getDouble("z"),
|
||||||
|
resultSet.getFloat("yaw"),
|
||||||
|
resultSet.getFloat("pitch"),
|
||||||
|
World.from(resultSet.getString("world_name"),
|
||||||
|
UUID.fromString(resultSet.getString("world_uuid"))),
|
||||||
|
resultSet.getString("server_name"),
|
||||||
|
PositionMeta.from(resultSet.getString("name"),
|
||||||
|
resultSet.getString("description"),
|
||||||
|
resultSet.getTimestamp("timestamp").toInstant(),
|
||||||
|
resultSet.getString("tags")),
|
||||||
|
UUID.fromString(resultSet.getString("home_uuid")),
|
||||||
|
User.of(UUID.fromString(resultSet.getString("owner_uuid")),
|
||||||
|
resultSet.getString("owner_username")),
|
||||||
|
resultSet.getBoolean("public")));
|
||||||
|
}
|
||||||
|
} catch (SQLException e) {
|
||||||
|
plugin.log(Level.SEVERE, "Failed to query the database for public home data");
|
||||||
|
}
|
||||||
|
return userHomes;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Optional<Home> getHome(@NotNull User user, @NotNull String homeName, boolean caseInsensitive) {
|
public Optional<Home> getHome(@NotNull User user, @NotNull String homeName, boolean caseInsensitive) {
|
||||||
try (PreparedStatement statement = getConnection().prepareStatement(formatStatementTables("""
|
try (PreparedStatement statement = getConnection().prepareStatement(formatStatementTables("""
|
||||||
|
|||||||
@@ -81,9 +81,11 @@ public class HomesManager {
|
|||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
public Map<String, List<String>> getPublicHomes() {
|
public Map<String, List<String>> getPublicHomes() {
|
||||||
return publicHomes.stream()
|
return publicHomes.stream().collect(
|
||||||
.collect(HashMap::new, (m, e) -> m.put(e.getOwner().getUsername(), List.of(e.getName())),
|
HashMap::new,
|
||||||
HashMap::putAll);
|
(m, e) -> m.put(e.getOwner().getUsername(), List.of(e.getName())),
|
||||||
|
HashMap::putAll
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -92,9 +94,26 @@ public class HomesManager {
|
|||||||
* @return a list of all cached public home identifiers
|
* @return a list of all cached public home identifiers
|
||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
public List<String> getPublicHomeIdentifiers() {
|
public List<String> getPublicHomeIdentifierNames() {
|
||||||
|
return publicHomes.stream().map(Home::getIdentifier).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a list of all cached public homes.
|
||||||
|
* <p>
|
||||||
|
* This will return the full home identifier if there are multiple homes with the same name.
|
||||||
|
*
|
||||||
|
* @return a list of all cached public home identifiers
|
||||||
|
*/
|
||||||
|
@NotNull
|
||||||
|
public List<String> getPublicHomeNames() {
|
||||||
return publicHomes.stream()
|
return publicHomes.stream()
|
||||||
.map(Home::getIdentifier)
|
.map(home -> {
|
||||||
|
if (publicHomes.stream().filter(h -> h.getName().equals(home.getName())).count() > 1) {
|
||||||
|
return home.getIdentifier();
|
||||||
|
}
|
||||||
|
return home.getName();
|
||||||
|
})
|
||||||
.toList();
|
.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ locales:
|
|||||||
error_no_homes_set: '[Error:](#ff3300) [You have not set any homes!](#ff7e5e)'
|
error_no_homes_set: '[Error:](#ff3300) [You have not set any homes!](#ff7e5e)'
|
||||||
error_no_public_homes_set: '[Error:](#ff3300) [There are no public homes set!](#ff7e5e)'
|
error_no_public_homes_set: '[Error:](#ff3300) [There are no public homes set!](#ff7e5e)'
|
||||||
error_no_warps_set: '[Error:](#ff3300) [There are no warps set!](#ff7e5e)'
|
error_no_warps_set: '[Error:](#ff3300) [There are no warps set!](#ff7e5e)'
|
||||||
|
error_unknown_public_home: '[Error:](#ff3300) [Could not find a public home with the name "%1%".](#ff7e5e)'
|
||||||
error_public_home_invalid: '[Грешка:](#ff3300) [Не можахме да открием публичен дом притежаван от %1% наречен %2%.](#ff7e5e)'
|
error_public_home_invalid: '[Грешка:](#ff3300) [Не можахме да открием публичен дом притежаван от %1% наречен %2%.](#ff7e5e)'
|
||||||
error_set_home_maximum_homes: '[Грешка:](#ff3300) [Можете да поставяте максимум до %1% домове!](#ff7e5e)'
|
error_set_home_maximum_homes: '[Грешка:](#ff3300) [Можете да поставяте максимум до %1% домове!](#ff7e5e)'
|
||||||
error_spawn_not_set: '[Error:](#ff3300) [The spawn position has not been set.](#ff7e5e)'
|
error_spawn_not_set: '[Error:](#ff3300) [The spawn position has not been set.](#ff7e5e)'
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ locales:
|
|||||||
error_no_homes_set: '[Fehler:](#ff3300) [Du hast keine Homes gesetzt!](#ff7e5e)'
|
error_no_homes_set: '[Fehler:](#ff3300) [Du hast keine Homes gesetzt!](#ff7e5e)'
|
||||||
error_no_public_homes_set: '[Fehler:](#ff3300) [Es sind keine öffentlichen Homes gesetzt!](#ff7e5e)'
|
error_no_public_homes_set: '[Fehler:](#ff3300) [Es sind keine öffentlichen Homes gesetzt!](#ff7e5e)'
|
||||||
error_no_warps_set: '[Fehler:](#ff3300) [Es sind keine Warps gesetzt!](#ff7e5e)'
|
error_no_warps_set: '[Fehler:](#ff3300) [Es sind keine Warps gesetzt!](#ff7e5e)'
|
||||||
|
error_unknown_public_home: '[Error:](#ff3300) [Could not find a public home with the name "%1%".](#ff7e5e)'
|
||||||
error_public_home_invalid: '[Fehler:](#ff3300) [Es wurde kein öffentliches Home von %1% namens "%2%" gefunden.](#ff7e5e)'
|
error_public_home_invalid: '[Fehler:](#ff3300) [Es wurde kein öffentliches Home von %1% namens "%2%" gefunden.](#ff7e5e)'
|
||||||
error_set_home_maximum_homes: '[Fehler:](#ff3300) [Du darfst nicht mehr als %1% Home(s) setzen!](#ff7e5e)'
|
error_set_home_maximum_homes: '[Fehler:](#ff3300) [Du darfst nicht mehr als %1% Home(s) setzen!](#ff7e5e)'
|
||||||
error_spawn_not_set: '[Fehler:](#ff3300) [Es wurde keine Spawn-Position festgelegt.](#ff7e5e)'
|
error_spawn_not_set: '[Fehler:](#ff3300) [Es wurde keine Spawn-Position festgelegt.](#ff7e5e)'
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ locales:
|
|||||||
error_no_homes_set: '[Error:](#ff3300) [You have not set any homes!](#ff7e5e)'
|
error_no_homes_set: '[Error:](#ff3300) [You have not set any homes!](#ff7e5e)'
|
||||||
error_no_public_homes_set: '[Error:](#ff3300) [There are no public homes set!](#ff7e5e)'
|
error_no_public_homes_set: '[Error:](#ff3300) [There are no public homes set!](#ff7e5e)'
|
||||||
error_no_warps_set: '[Error:](#ff3300) [There are no warps set!](#ff7e5e)'
|
error_no_warps_set: '[Error:](#ff3300) [There are no warps set!](#ff7e5e)'
|
||||||
|
error_unknown_public_home: '[Error:](#ff3300) [Could not find a public home with the name "%1%".](#ff7e5e)'
|
||||||
error_public_home_invalid: '[Error:](#ff3300) [Could not find a public home owned by %1% called %2%.](#ff7e5e)'
|
error_public_home_invalid: '[Error:](#ff3300) [Could not find a public home owned by %1% called %2%.](#ff7e5e)'
|
||||||
error_set_home_maximum_homes: '[Error:](#ff3300) [You can only set a maximum of %1% homes!](#ff7e5e)'
|
error_set_home_maximum_homes: '[Error:](#ff3300) [You can only set a maximum of %1% homes!](#ff7e5e)'
|
||||||
error_spawn_not_set: '[Error:](#ff3300) [The spawn position has not been set.](#ff7e5e)'
|
error_spawn_not_set: '[Error:](#ff3300) [The spawn position has not been set.](#ff7e5e)'
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ locales:
|
|||||||
error_no_homes_set: '[Error:](#ff3300) [¡No tienes ninguna casa!](#ff7e5e)'
|
error_no_homes_set: '[Error:](#ff3300) [¡No tienes ninguna casa!](#ff7e5e)'
|
||||||
error_no_public_homes_set: '[Error:](#ff3300) [No se han establecido hogares públicos.](#ff7e5e)'
|
error_no_public_homes_set: '[Error:](#ff3300) [No se han establecido hogares públicos.](#ff7e5e)'
|
||||||
error_no_warps_set: '[Error:](#ff3300) [No hay warps creados.](#ff7e5e)'
|
error_no_warps_set: '[Error:](#ff3300) [No hay warps creados.](#ff7e5e)'
|
||||||
|
error_unknown_public_home: '[Error:](#ff3300) [Could not find a public home with the name "%1%".](#ff7e5e)'
|
||||||
error_public_home_invalid: '[Error:](#ff3300) [No se ha podido encontrar una casa pública propiedad de %1% llamada %2%.](#ff7e5e)'
|
error_public_home_invalid: '[Error:](#ff3300) [No se ha podido encontrar una casa pública propiedad de %1% llamada %2%.](#ff7e5e)'
|
||||||
error_set_home_maximum_homes: '[Error:](#ff3300) [Sólo se puede establecer un máximo de %1% casas!](#ff7e5e)'
|
error_set_home_maximum_homes: '[Error:](#ff3300) [Sólo se puede establecer un máximo de %1% casas!](#ff7e5e)'
|
||||||
error_spawn_not_set: '[Error:](#ff3300) [La posición del spawn no ha sido fijada.](#ff7e5e)'
|
error_spawn_not_set: '[Error:](#ff3300) [La posición del spawn no ha sido fijada.](#ff7e5e)'
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ locales:
|
|||||||
error_no_homes_set: '[Erreur :](#ff3300) [Vous n''avez créer aucun homes !](#ff7e5e)'
|
error_no_homes_set: '[Erreur :](#ff3300) [Vous n''avez créer aucun homes !](#ff7e5e)'
|
||||||
error_no_public_homes_set: '[Erreur :](#ff3300)[Aucun home publique n''a été créé !](#ff7e5e)'
|
error_no_public_homes_set: '[Erreur :](#ff3300)[Aucun home publique n''a été créé !](#ff7e5e)'
|
||||||
error_no_warps_set: '[Erreur :](#ff3300) [Aucun warp n''a été créé !](#ff7e5e)'
|
error_no_warps_set: '[Erreur :](#ff3300) [Aucun warp n''a été créé !](#ff7e5e)'
|
||||||
|
error_unknown_public_home: '[Error:](#ff3300) [Could not find a public home with the name "%1%".](#ff7e5e)'
|
||||||
error_public_home_invalid: '[Erreur :](#ff3300) [L''home %2% posseder par %1% est introuvable.](#ff7e5e)'
|
error_public_home_invalid: '[Erreur :](#ff3300) [L''home %2% posseder par %1% est introuvable.](#ff7e5e)'
|
||||||
error_set_home_maximum_homes: '[Erreur :](#ff3300) [Vous ne pouvez avoir qu''un maximum de %1% homes !](#ff7e5e)'
|
error_set_home_maximum_homes: '[Erreur :](#ff3300) [Vous ne pouvez avoir qu''un maximum de %1% homes !](#ff7e5e)'
|
||||||
error_spawn_not_set: '[Erreur :](#ff3300) [La position du spawn n''a pas été définit.](#ff7e5e)'
|
error_spawn_not_set: '[Erreur :](#ff3300) [La position du spawn n''a pas été définit.](#ff7e5e)'
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ locales:
|
|||||||
error_no_homes_set: '[Errore:](#ff3300) [Non hai nessuna home!](#ff7e5e)'
|
error_no_homes_set: '[Errore:](#ff3300) [Non hai nessuna home!](#ff7e5e)'
|
||||||
error_no_public_homes_set: '[Errore:](#ff3300) [Non ci sono home pubbliche!](#ff7e5e)'
|
error_no_public_homes_set: '[Errore:](#ff3300) [Non ci sono home pubbliche!](#ff7e5e)'
|
||||||
error_no_warps_set: '[Errore:](#ff3300) [Non ci sono warp impostati!](#ff7e5e)'
|
error_no_warps_set: '[Errore:](#ff3300) [Non ci sono warp impostati!](#ff7e5e)'
|
||||||
|
error_unknown_public_home: '[Error:](#ff3300) [Could not find a public home with the name "%1%".](#ff7e5e)'
|
||||||
error_public_home_invalid: '[Errore:](#ff3300) [Non trovo la home di %1% chiamata %2%.](#ff7e5e)'
|
error_public_home_invalid: '[Errore:](#ff3300) [Non trovo la home di %1% chiamata %2%.](#ff7e5e)'
|
||||||
error_set_home_maximum_homes: '[Errore:](#ff3300) [Puoi impostare un massimo di %1% home!](#ff7e5e)'
|
error_set_home_maximum_homes: '[Errore:](#ff3300) [Puoi impostare un massimo di %1% home!](#ff7e5e)'
|
||||||
error_spawn_not_set: '[Errore:](#ff3300) [Il punto di spawn non è impostato.](#ff7e5e)'
|
error_spawn_not_set: '[Errore:](#ff3300) [Il punto di spawn non è impostato.](#ff7e5e)'
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ locales:
|
|||||||
error_no_homes_set: '[エラー:](#ff3300) [ホームをまだ設定していません!](#ff7e5e)'
|
error_no_homes_set: '[エラー:](#ff3300) [ホームをまだ設定していません!](#ff7e5e)'
|
||||||
error_no_public_homes_set: '[エラー:](#ff3300) [パブリックホームはまだ設定されていません!(#ff7e5e)'
|
error_no_public_homes_set: '[エラー:](#ff3300) [パブリックホームはまだ設定されていません!(#ff7e5e)'
|
||||||
error_no_warps_set: '[エラー:](#ff3300) [ワープはまだ設定されていません!](#ff7e5e)'
|
error_no_warps_set: '[エラー:](#ff3300) [ワープはまだ設定されていません!](#ff7e5e)'
|
||||||
|
error_unknown_public_home: '[Error:](#ff3300) [Could not find a public home with the name "%1%".](#ff7e5e)'
|
||||||
error_public_home_invalid: '[エラー:](#ff3300) [%1% が所有するパブリックホーム %2% は見つかりませんでした。](#ff7e5e)'
|
error_public_home_invalid: '[エラー:](#ff3300) [%1% が所有するパブリックホーム %2% は見つかりませんでした。](#ff7e5e)'
|
||||||
error_set_home_maximum_homes: '[エラー:](#ff3300) [最大で %1% までしかホームを設定できません!](#ff7e5e)'
|
error_set_home_maximum_homes: '[エラー:](#ff3300) [最大で %1% までしかホームを設定できません!](#ff7e5e)'
|
||||||
error_spawn_not_set: '[エラー:](#ff3300) [スポーン位置がまだ設定されていません。](#ff7e5e)'
|
error_spawn_not_set: '[エラー:](#ff3300) [スポーン位置がまだ設定されていません。](#ff7e5e)'
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ locales:
|
|||||||
error_no_homes_set: '[오류:](#ff3300) [당신은 아직 아무 집도 설정하지 않았습니다!](#ff7e5e)'
|
error_no_homes_set: '[오류:](#ff3300) [당신은 아직 아무 집도 설정하지 않았습니다!](#ff7e5e)'
|
||||||
error_no_public_homes_set: '[오류:](#ff3300) [설정된 공용 집이 없습니다!](#ff7e5e)'
|
error_no_public_homes_set: '[오류:](#ff3300) [설정된 공용 집이 없습니다!](#ff7e5e)'
|
||||||
error_no_warps_set: '[오류:](#ff3300) [설정된 워프가 없습니다!](#ff7e5e)'
|
error_no_warps_set: '[오류:](#ff3300) [설정된 워프가 없습니다!](#ff7e5e)'
|
||||||
|
error_unknown_public_home: '[Error:](#ff3300) [Could not find a public home with the name "%1%".](#ff7e5e)'
|
||||||
error_public_home_invalid: '[오류:](#ff3300) [%1%님이 소유한 공용 집 %2%를 찾을 수 없습니다.](#ff7e5e)'
|
error_public_home_invalid: '[오류:](#ff3300) [%1%님이 소유한 공용 집 %2%를 찾을 수 없습니다.](#ff7e5e)'
|
||||||
error_set_home_maximum_homes: '[오류:](#ff3300) [%1%개 이상의 집을 생성할 수 없습니다!](#ff7e5e)'
|
error_set_home_maximum_homes: '[오류:](#ff3300) [%1%개 이상의 집을 생성할 수 없습니다!](#ff7e5e)'
|
||||||
error_spawn_not_set: '[오류:](#ff3300) [스폰 위치가 아직 지정되지 않았습니다.](#ff7e5e)'
|
error_spawn_not_set: '[오류:](#ff3300) [스폰 위치가 아직 지정되지 않았습니다.](#ff7e5e)'
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ locales:
|
|||||||
error_no_homes_set: '[Błąd:](#ff3300) [Nie ustawiłeś żadnych domów!](#ff7e5e)'
|
error_no_homes_set: '[Błąd:](#ff3300) [Nie ustawiłeś żadnych domów!](#ff7e5e)'
|
||||||
error_no_public_homes_set: '[Błąd:](#ff3300) [Nie ma ustawionych żadnych domów publicznych!](#ff7e5e)'
|
error_no_public_homes_set: '[Błąd:](#ff3300) [Nie ma ustawionych żadnych domów publicznych!](#ff7e5e)'
|
||||||
error_no_warps_set: '[Błąd:](#ff3300) [Nie ma ustawionych żadnych warpów!](#ff7e5e)'
|
error_no_warps_set: '[Błąd:](#ff3300) [Nie ma ustawionych żadnych warpów!](#ff7e5e)'
|
||||||
|
error_unknown_public_home: '[Error:](#ff3300) [Could not find a public home with the name "%1%".](#ff7e5e)'
|
||||||
error_public_home_invalid: '[Błąd:](#ff3300) [Nie można znaleźć domu publicznego należącego do %1% o nazwie %2%.](#ff7e5e)'
|
error_public_home_invalid: '[Błąd:](#ff3300) [Nie można znaleźć domu publicznego należącego do %1% o nazwie %2%.](#ff7e5e)'
|
||||||
error_set_home_maximum_homes: '[Błąd:](#ff3300) [Możesz ustawić maksymalnie %1% domów!](#ff7e5e)'
|
error_set_home_maximum_homes: '[Błąd:](#ff3300) [Możesz ustawić maksymalnie %1% domów!](#ff7e5e)'
|
||||||
error_spawn_not_set: '[Błąd:](#ff3300) [Pozycja spawnu nie została jeszcze ustawiona.](#ff7e5e)'
|
error_spawn_not_set: '[Błąd:](#ff3300) [Pozycja spawnu nie została jeszcze ustawiona.](#ff7e5e)'
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ locales:
|
|||||||
error_no_homes_set: '[Erro:](#ff3300) [Você não definiu nenhuma casa!](#ff7e5e)'
|
error_no_homes_set: '[Erro:](#ff3300) [Você não definiu nenhuma casa!](#ff7e5e)'
|
||||||
error_no_public_homes_set: '[Erro:](#ff3300) [Não há casas públicas definidas!](#ff7e5e)'
|
error_no_public_homes_set: '[Erro:](#ff3300) [Não há casas públicas definidas!](#ff7e5e)'
|
||||||
error_no_warps_set: '[Erro:](#ff3300) [Não há warps definidos!](#ff7e5e)'
|
error_no_warps_set: '[Erro:](#ff3300) [Não há warps definidos!](#ff7e5e)'
|
||||||
|
error_unknown_public_home: '[Error:](#ff3300) [Could not find a public home with the name "%1%".](#ff7e5e)'
|
||||||
error_public_home_invalid: '[Erro:](#ff3300) [Não foi possível encontrar uma casa pública de %1% chamada %2%.](#ff7e5e)'
|
error_public_home_invalid: '[Erro:](#ff3300) [Não foi possível encontrar uma casa pública de %1% chamada %2%.](#ff7e5e)'
|
||||||
error_set_home_maximum_homes: '[Erro:](#ff3300) [Você só pode definir no máximo %1% casas!](#ff7e5e)'
|
error_set_home_maximum_homes: '[Erro:](#ff3300) [Você só pode definir no máximo %1% casas!](#ff7e5e)'
|
||||||
error_spawn_not_set: '[Erro:](#ff3300) [A posição de spawn não foi definida.](#ff7e5e)'
|
error_spawn_not_set: '[Erro:](#ff3300) [A posição de spawn não foi definida.](#ff7e5e)'
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ locales:
|
|||||||
error_no_homes_set: '[Ошибка:](#ff3300) [Вы не установили ни одного дома!](#ff7e5e)'
|
error_no_homes_set: '[Ошибка:](#ff3300) [Вы не установили ни одного дома!](#ff7e5e)'
|
||||||
error_no_public_homes_set: '[Ошибка:](#ff3300) [Публичные дома не установлены!](#ff7e5e)'
|
error_no_public_homes_set: '[Ошибка:](#ff3300) [Публичные дома не установлены!](#ff7e5e)'
|
||||||
error_no_warps_set: '[Ошибка:](#ff3300) [Телепортации не установлены!](#ff7e5e)'
|
error_no_warps_set: '[Ошибка:](#ff3300) [Телепортации не установлены!](#ff7e5e)'
|
||||||
|
error_unknown_public_home: '[Error:](#ff3300) [Could not find a public home with the name "%1%".](#ff7e5e)'
|
||||||
error_public_home_invalid: '[Ошибка:](#ff3300) [Невозможно найти публичный дом, принадлежащий %1%, с именем %2%.](#ff7e5e)'
|
error_public_home_invalid: '[Ошибка:](#ff3300) [Невозможно найти публичный дом, принадлежащий %1%, с именем %2%.](#ff7e5e)'
|
||||||
error_set_home_maximum_homes: '[Ошибка:](#ff3300) [Вы можете установить максимум %1% домов!](#ff7e5e)'
|
error_set_home_maximum_homes: '[Ошибка:](#ff3300) [Вы можете установить максимум %1% домов!](#ff7e5e)'
|
||||||
error_spawn_not_set: '[Ошибка:](#ff3300) [Позиция спавна не установлена.](#ff7e5e)'
|
error_spawn_not_set: '[Ошибка:](#ff3300) [Позиция спавна не установлена.](#ff7e5e)'
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ locales:
|
|||||||
error_no_homes_set: '[Hata:](#ff3300) [Herhangi bir ev belirlemediniz!](#ff7e5e)'
|
error_no_homes_set: '[Hata:](#ff3300) [Herhangi bir ev belirlemediniz!](#ff7e5e)'
|
||||||
error_no_public_homes_set: '[Hata:](#ff3300) [Halka açık ayarlanan ev yok!](#ff7e5e)'
|
error_no_public_homes_set: '[Hata:](#ff3300) [Halka açık ayarlanan ev yok!](#ff7e5e)'
|
||||||
error_no_warps_set: '[Hata:](#ff3300) [Ayarlanan warp yok!](#ff7e5e)'
|
error_no_warps_set: '[Hata:](#ff3300) [Ayarlanan warp yok!](#ff7e5e)'
|
||||||
|
error_unknown_public_home: '[Error:](#ff3300) [Could not find a public home with the name "%1%".](#ff7e5e)'
|
||||||
error_public_home_invalid: '[Hata:](#ff3300) [%1% tarafından sahip olunan, %2% adında bir herkese açık ev bulunamadı.](#ff7e5e)'
|
error_public_home_invalid: '[Hata:](#ff3300) [%1% tarafından sahip olunan, %2% adında bir herkese açık ev bulunamadı.](#ff7e5e)'
|
||||||
error_set_home_maximum_homes: '[Hata:](#ff3300) [En fazla %1% ev ayarlayabilirsiniz!](#ff7e5e)'
|
error_set_home_maximum_homes: '[Hata:](#ff3300) [En fazla %1% ev ayarlayabilirsiniz!](#ff7e5e)'
|
||||||
error_spawn_not_set: '[Hata:](#ff3300) [Spawn konumu ayarlanmadı.](#ff7e5e)'
|
error_spawn_not_set: '[Hata:](#ff3300) [Spawn konumu ayarlanmadı.](#ff7e5e)'
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ locales:
|
|||||||
error_no_homes_set: '[Error:](#ff3300) [You have not set any homes!](#ff7e5e)'
|
error_no_homes_set: '[Error:](#ff3300) [You have not set any homes!](#ff7e5e)'
|
||||||
error_no_public_homes_set: '[Error:](#ff3300) [There are no public homes set!](#ff7e5e)'
|
error_no_public_homes_set: '[Error:](#ff3300) [There are no public homes set!](#ff7e5e)'
|
||||||
error_no_warps_set: '[Error:](#ff3300) [There are no warps set!](#ff7e5e)'
|
error_no_warps_set: '[Error:](#ff3300) [There are no warps set!](#ff7e5e)'
|
||||||
|
error_unknown_public_home: '[Error:](#ff3300) [Could not find a public home with the name "%1%".](#ff7e5e)'
|
||||||
error_public_home_invalid: '[Помилка:](#ff3300) [Не знайдено домівку гравця %1% з назвою %2%.](#ff7e5e)'
|
error_public_home_invalid: '[Помилка:](#ff3300) [Не знайдено домівку гравця %1% з назвою %2%.](#ff7e5e)'
|
||||||
error_set_home_maximum_homes: '[Помилка:](#ff3300) [Максимальна кількість твоїх домівок: %1%](#ff7e5e)'
|
error_set_home_maximum_homes: '[Помилка:](#ff3300) [Максимальна кількість твоїх домівок: %1%](#ff7e5e)'
|
||||||
error_spawn_not_set: '[Error:](#ff3300) [The spawn position has not been set.](#ff7e5e)'
|
error_spawn_not_set: '[Error:](#ff3300) [The spawn position has not been set.](#ff7e5e)'
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ locales:
|
|||||||
error_no_homes_set: '[错误:](#ff3300) [你还没设置任何家!](#ff7e5e)'
|
error_no_homes_set: '[错误:](#ff3300) [你还没设置任何家!](#ff7e5e)'
|
||||||
error_no_public_homes_set: '[错误:](#ff3300) [没有任何公共的家!](#ff7e5e)'
|
error_no_public_homes_set: '[错误:](#ff3300) [没有任何公共的家!](#ff7e5e)'
|
||||||
error_no_warps_set: '[错误:](#ff3300) [没有任何地标!](#ff7e5e)'
|
error_no_warps_set: '[错误:](#ff3300) [没有任何地标!](#ff7e5e)'
|
||||||
|
error_unknown_public_home: '[Error:](#ff3300) [Could not find a public home with the name "%1%".](#ff7e5e)'
|
||||||
error_public_home_invalid: '[错误:](#ff3300) [%1% 没有 %2% 公共家.](#ff7e5e)'
|
error_public_home_invalid: '[错误:](#ff3300) [%1% 没有 %2% 公共家.](#ff7e5e)'
|
||||||
error_set_home_maximum_homes: '[错误:](#ff3300) [最多可以设置 %1% 个家!](#ff7e5e)'
|
error_set_home_maximum_homes: '[错误:](#ff3300) [最多可以设置 %1% 个家!](#ff7e5e)'
|
||||||
error_spawn_not_set: '[错误:](#ff3300) [重生点尚未设置](#ff7e5e)'
|
error_spawn_not_set: '[错误:](#ff3300) [重生点尚未设置](#ff7e5e)'
|
||||||
|
|||||||
@@ -142,6 +142,7 @@
|
|||||||
error_no_homes_set: '[錯誤:](#ff3300) [您還沒有設置任何家!](#ff7e5e)'
|
error_no_homes_set: '[錯誤:](#ff3300) [您還沒有設置任何家!](#ff7e5e)'
|
||||||
error_no_public_homes_set: '[錯誤:](#ff3300) [目前沒有公共的家可傳送!](#ff7e5e)'
|
error_no_public_homes_set: '[錯誤:](#ff3300) [目前沒有公共的家可傳送!](#ff7e5e)'
|
||||||
error_no_warps_set: '[錯誤:](#ff3300) [目前沒有可傳送的地標!](#ff7e5e)'
|
error_no_warps_set: '[錯誤:](#ff3300) [目前沒有可傳送的地標!](#ff7e5e)'
|
||||||
|
error_unknown_public_home: '[Error:](#ff3300) [Could not find a public home with the name "%1%".](#ff7e5e)'
|
||||||
error_public_home_invalid: '[錯誤:](#ff3300) [沒有在 %1% 名下找到名為 %2% 的公開傳點.](#ff7e5e)'
|
error_public_home_invalid: '[錯誤:](#ff3300) [沒有在 %1% 名下找到名為 %2% 的公開傳點.](#ff7e5e)'
|
||||||
error_set_home_maximum_homes: '[錯誤:](#ff3300) [最多可以設置 %1% 個家!](#ff7e5e)'
|
error_set_home_maximum_homes: '[錯誤:](#ff3300) [最多可以設置 %1% 個家!](#ff7e5e)'
|
||||||
error_spawn_not_set: '[錯誤:](#ff3300) [重生點尚未設置.](#ff7e5e)'
|
error_spawn_not_set: '[錯誤:](#ff3300) [重生點尚未設置.](#ff7e5e)'
|
||||||
|
|||||||
Reference in new issue
Block a user