Add EssentialsX importer, update docs (#390)

This commit is contained in:
William authored and GitHub committed 2023-05-04 18:29:59 +01:00
1 parent dba87cf428
commit 58f1dc6111
25 files changed
+581 -105

No files matched your search

+1
View File
@@ -44,6 +44,7 @@ allprojects {
maven { url 'https://repo.extendedclip.com/content/repositories/placeholderapi/' }
maven { url 'https://repo.minebench.de/' }
maven { url 'https://repo.alessiodp.com/releases/' }
maven { url 'https://repo.essentialsx.net/releases/' }
maven { url 'https://repo.mikeprimm.com/' }
maven { url 'https://jitpack.io' }
}
+1
View File
@@ -15,6 +15,7 @@ dependencies {
compileOnly 'com.github.MilkBowl:VaultAPI:1.7.1'
compileOnly 'com.github.Emibergo02:RedisEconomy:master-SNAPSHOT'
compileOnly 'me.clip:placeholderapi:2.11.3'
compileOnly 'net.essentialsx:EssentialsX:2.19.7'
testImplementation 'com.github.seeseemelk:MockBukkit-v1.16:1.5.2'
testImplementation 'de.themoep:minedown-adventure:1.7.2-SNAPSHOT'
@@ -37,6 +37,7 @@ import net.william278.huskhomes.hook.Hook;
import net.william278.huskhomes.hook.PlaceholderAPIHook;
import net.william278.huskhomes.hook.RedisEconomyHook;
import net.william278.huskhomes.hook.VaultEconomyHook;
import net.william278.huskhomes.importer.EssentialsXImporter;
import net.william278.huskhomes.listener.BukkitEventListener;
import net.william278.huskhomes.listener.EventListener;
import net.william278.huskhomes.manager.Manager;
@@ -212,6 +213,7 @@ public class BukkitHuskHomes extends JavaPlugin implements HuskHomes, BukkitTask
public void registerHooks() {
HuskHomes.super.registerHooks();
// Hooks
if (getSettings().doEconomy()) {
if (isDependencyLoaded("RedisEconomy")) {
getHooks().add(new RedisEconomyHook(this));
@@ -222,6 +224,11 @@ public class BukkitHuskHomes extends JavaPlugin implements HuskHomes, BukkitTask
if (isDependencyLoaded("PlaceholderAPI")) {
getHooks().add(new PlaceholderAPIHook(this));
}
// Importers
if (isDependencyLoaded("Essentials")) {
getHooks().add(new EssentialsXImporter(this));
}
}
@Override
@@ -0,0 +1,116 @@
package net.william278.huskhomes.importer;
import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.Warps;
import net.william278.huskhomes.BukkitHuskHomes;
import net.william278.huskhomes.HuskHomes;
import net.william278.huskhomes.position.Position;
import net.william278.huskhomes.user.User;
import net.william278.huskhomes.util.BukkitAdapter;
import org.jetbrains.annotations.NotNull;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicInteger;
public class EssentialsXImporter extends Importer {
private final Essentials essentials;
public EssentialsXImporter(@NotNull HuskHomes plugin) {
super("EssentialsX", List.of(ImportData.USERS, ImportData.HOMES, ImportData.WARPS), plugin);
this.essentials = (Essentials) ((BukkitHuskHomes) plugin).getServer().getPluginManager().getPlugin("Essentials");
}
private int importUsers() {
final AtomicInteger usersImported = new AtomicInteger();
for (UUID uuid : essentials.getUserMap().getAllUniqueUsers()) {
final User user = User.of(
uuid,
essentials.getUser(uuid).getLastAccountName()
);
plugin.getDatabase().ensureUser(user);
plugin.editUserData(user, (editor -> editor.setHomeSlots(Math.max(
plugin.getSettings().getFreeHomeSlots(),
essentials.getUser(uuid).getHomes().size()
))));
usersImported.getAndIncrement();
}
return usersImported.get();
}
private int importHomes() {
final AtomicInteger homesImported = new AtomicInteger();
for (UUID uuid : essentials.getUserMap().getAllUniqueUsers()) {
final com.earth2me.essentials.User essentialsUser = essentials.getUser(uuid);
for (String homeName : essentialsUser.getHomes()) {
BukkitAdapter.adaptLocation(essentialsUser.getHome(homeName))
.map(location -> Position.at(location, plugin.getServerName()))
.ifPresent(position -> {
plugin.getManager().homes().createHome(
User.of(uuid, essentialsUser.getLastAccountName()),
this.normalizeName(homeName),
position,
true, true
);
homesImported.getAndIncrement();
});
}
}
return homesImported.get();
}
private int importWarps() throws Throwable {
final AtomicInteger warpsImported = new AtomicInteger();
final Warps warps = essentials.getWarps();
for (String warpName : warps.getList()) {
BukkitAdapter.adaptLocation(warps.getWarp(warpName))
.map(location -> Position.at(location, plugin.getServerName()))
.ifPresent(position -> {
plugin.getManager().warps().createWarp(
this.normalizeName(warpName),
position,
true
);
warpsImported.getAndIncrement();
});
}
return warpsImported.get();
}
@NotNull
private String normalizeName(@NotNull String name) {
if (plugin.getValidator().isValidName(name)) {
return name;
}
// Remove spaces
name = name.replaceAll(" ", "_");
// Remove unicode characters
if (!plugin.getSettings().doAllowUnicodeNames()) {
name = name.replaceAll("[^A-Za-z0-9_-]", "");
}
// Ensure the name is not blank
if (name.isBlank()) {
name = "imported-" + UUID.randomUUID().toString().substring(0, 5);
}
// Ensure name is not too long
if (name.length() > 16) {
name = name.substring(0, 16);
}
return name;
}
@Override
protected int importData(@NotNull Importer.ImportData importData) throws Throwable {
return switch (importData) {
case USERS -> importUsers();
case HOMES -> importHomes();
case WARPS -> importWarps();
};
}
}
@@ -4,5 +4,13 @@ huskhomes {
page brigadier:integer;
}
reload;
import {
list {
page brigadier:integer;
}
start {
name brigadier:string single_word;
}
}
update;
}
+2 -3
View File
@@ -12,7 +12,6 @@ softdepend:
- dynmap
- BlueMap
- Plan
loadbefore:
- Essentials
libraries:
- 'redis.clients:jedis:${jedis_version}'
@@ -65,7 +64,7 @@ commands:
usage: /<command> [player]
aliases: [tpdeny, tpno]
rtp:
usage: /<command> [player]
usage: /<command> [player] [world]
tpignore:
usage: /<command>
tpoffline:
@@ -81,4 +80,4 @@ commands:
back:
usage: /<command>
huskhomes:
usage: /<command> [about|help|reload|update]
usage: /<command> [about|help|reload|import|update]
@@ -33,6 +33,7 @@ import net.william278.huskhomes.config.Spawn;
import net.william278.huskhomes.database.Database;
import net.william278.huskhomes.event.EventDispatcher;
import net.william278.huskhomes.hook.*;
import net.william278.huskhomes.importer.Importer;
import net.william278.huskhomes.manager.Manager;
import net.william278.huskhomes.network.Broker;
import net.william278.huskhomes.position.Location;
@@ -55,6 +56,7 @@ import java.lang.reflect.InvocationTargetException;
import java.util.*;
import java.util.function.Consumer;
import java.util.logging.Level;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
@@ -260,6 +262,14 @@ public interface HuskHomes extends TaskRunner, EventDispatcher, SafetyResolver {
return getHook(MapHook.class);
}
@NotNull
default List<Importer> getImporters() {
return getHooks().stream()
.filter(hook -> Importer.class.isAssignableFrom(hook.getClass()))
.map(Importer.class::cast)
.collect(Collectors.toList());
}
/**
* Perform an economy check on the {@link OnlineUser}; returning {@code true} if it passes the check
*
@@ -26,13 +26,17 @@ import net.william278.desertwell.about.AboutMenu;
import net.william278.desertwell.util.UpdateChecker;
import net.william278.huskhomes.HuskHomes;
import net.william278.huskhomes.config.Locales;
import net.william278.huskhomes.importer.Importer;
import net.william278.huskhomes.user.CommandUser;
import net.william278.paginedown.PaginatedList;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
public class HuskHomesCommand extends Command implements TabProvider {
@@ -40,6 +44,7 @@ public class HuskHomesCommand extends Command implements TabProvider {
"about", false,
"help", false,
"reload", true,
"import", true,
"update", true
);
@@ -108,11 +113,44 @@ public class HuskHomesCommand extends Command implements TabProvider {
plugin.getLocales().getLocale("update_available", checked.getLatestVersion().toString(),
plugin.getVersion().toString()).ifPresent(executor::sendMessage);
});
case "import" -> {
if (plugin.getImporters().isEmpty()) {
plugin.getLocales().getLocale("error_no_importers_available")
.ifPresent(executor::sendMessage);
return;
}
this.importData(executor, removeFirstArg(args));
}
default -> plugin.getLocales().getLocale("error_invalid_syntax", getUsage())
.ifPresent(executor::sendMessage);
}
}
private void importData(@NotNull CommandUser executor, String[] args) {
switch (parseStringArg(args, 0).orElse("list")) {
case "start" -> parseStringArg(args, 1).ifPresentOrElse(
name -> {
final Optional<Importer> importer = plugin.getImporters().stream()
.filter(available -> available.getImporterName().equalsIgnoreCase(name)).findFirst();
if (importer.isEmpty()) {
plugin.getLocales().getLocale("error_invalid_importer")
.ifPresent(executor::sendMessage);
return;
}
importer.get().start(executor);
},
() -> plugin.getLocales().getLocale("error_invalid_syntax",
"/" + getName() + " import start <importer>")
.ifPresent(executor::sendMessage)
);
case "list" -> executor.sendMessage(getImporterList()
.getNearestValidPage(parseIntArg(args, 1).orElse(1)));
default -> plugin.getLocales().getLocale("error_invalid_syntax",
"/" + getName() + " import <start|list>")
.ifPresent(executor::sendMessage);
}
}
@NotNull
private PaginatedList getCommandList(@NotNull CommandUser user) {
return PaginatedList.of(plugin.getCommands().stream()
@@ -131,10 +169,41 @@ public class HuskHomesCommand extends Command implements TabProvider {
.build());
}
@Override
@NotNull
private PaginatedList getImporterList() {
return PaginatedList.of(plugin.getImporters().stream()
.map(importer -> plugin.getLocales().getRawLocale("importer_list_item",
Locales.escapeText(importer.getImporterName()),
Locales.escapeText(importer.getSupportedImportData().stream()
.map(Importer.ImportData::getName)
.collect(Collectors.joining(", "))))
.orElse(importer.getName()))
.collect(Collectors.toList()),
plugin.getLocales().getBaseList(Math.min(plugin.getSettings().getListItemsPerPage(), 6))
.setHeaderFormat(plugin.getLocales().getRawLocale("importer_list_title").orElse(""))
.setItemSeparator("\n").setCommand("/huskhomes:huskhomes import list")
.build());
}
@Override
@Nullable
public List<String> suggest(@NotNull CommandUser user, @NotNull String[] args) {
return args.length < 2 ? SUB_COMMANDS.keySet().stream().sorted().toList() : List.of();
return switch (args.length) {
case 0, 1 -> SUB_COMMANDS.keySet().stream().sorted().toList();
case 2 -> switch (args[0].toLowerCase()) {
case "help" -> IntStream.rangeClosed(1, getCommandList(user).getTotalPages())
.mapToObj(Integer::toString).toList();
case "import" -> List.of("start", "list");
default -> null;
};
case 3 -> {
if (!args[0].equalsIgnoreCase("import") && !args[1].equalsIgnoreCase("start")) {
yield null;
}
yield plugin.getImporters().stream().map(Importer::getImporterName).toList();
}
default -> null;
};
}
}
@@ -0,0 +1,96 @@
package net.william278.huskhomes.importer;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.TextColor;
import net.william278.huskhomes.HuskHomes;
import net.william278.huskhomes.hook.Hook;
import net.william278.huskhomes.user.CommandUser;
import net.william278.huskhomes.user.OnlineUser;
import org.jetbrains.annotations.NotNull;
import java.time.LocalDateTime;
import java.time.temporal.ChronoUnit;
import java.util.List;
import java.util.logging.Level;
public abstract class Importer extends Hook {
protected final HuskHomes plugin;
private final String name;
private final List<ImportData> supportedImportData;
protected Importer(@NotNull String name, @NotNull List<ImportData> supportedData, @NotNull HuskHomes plugin) {
super(plugin, name + " Importer");
this.name = name;
this.supportedImportData = supportedData;
this.plugin = plugin;
}
@Override
public void initialize() {
// No initialization required
}
public final void start(@NotNull CommandUser user) {
final LocalDateTime startTime = LocalDateTime.now();
log(user, Level.INFO, "⌚ Starting " + name + " data import...");
for (ImportData data : supportedImportData) {
try {
log(user, Level.INFO, "│ ⌚ Importing " + data.getName() + "...");
final int entries = importData(data);
log(user, Level.INFO, "│ └ ✔ Imported " + data.getName() + " (" + entries + " entries)");
} catch (Throwable e) {
log(user, Level.WARNING, "│ └ ❌ Failed to import " + data.getName() + ": " + e.getMessage(), e);
return;
}
}
final long timeTaken = startTime.until(LocalDateTime.now(), ChronoUnit.SECONDS);
log(user, Level.INFO, "✔ Completed import from " + name + " (took " + timeTaken + "s)");
}
protected abstract int importData(@NotNull ImportData importData) throws Throwable;
protected final void log(@NotNull CommandUser user, @NotNull Level level, @NotNull String message, @NotNull Throwable... e) {
message = "[Importer] " + message;
if (user instanceof OnlineUser online) {
final TextColor color = level == Level.SEVERE || level == Level.WARNING
? TextColor.color(0xff3300)
: TextColor.color(0xfff021);
online.sendMessage(Component.text(message, color));
}
plugin.log(level, message, e);
}
@NotNull
public String getImporterName() {
return name;
}
@NotNull
public List<ImportData> getSupportedImportData() {
return supportedImportData;
}
/**
* Represents types of data that can be imported
*/
public enum ImportData {
USERS("User Data"),
HOMES("Homes"),
WARPS("Warps");
private final String name;
ImportData(@NotNull String name) {
this.name = name;
}
@NotNull
public String getName() {
return name;
}
}
}
@@ -98,6 +98,10 @@ map_hook_public_homes_marker_set_name: 'Public Homes'
map_hook_warps_marker_set_name: 'Warps'
up_to_date: '[HuskHomes](#00fb9a bold) [| You are running the latest version of HuskHomes (v%1%).](#00fb9a)'
update_available: '[HuskHomes](#ff7e5e bold) [| A new version of HuskHomes is available: v%1% (running: v%2%).](#ff7e5e)'
importer_list_title: '[HuskHomes](#00fb9a bold) [| Available Data Importers:](#00fb9a)\n'
importer_list_item: '[%1%](#00fb9a show_text=&#00fb9a&Click to import data through this importer. suggest_command=/huskhomes:huskhomes import start %1%) [⏩ %2%](white show_text=&#00fb9a&This importer supports importing:\n&f%2% suggest_command=/huskhomes:huskhomes import start %1%)'
error_no_importers_available: '[Error:](#ff3300) [No importers are currently available. Please check the](#ff7e5e) [plugin docs](#ff7e5e italic show_text=&#ff7e5e&Click to open link open_url=https://william278.net/docs/huskhomes/importing-data) [for more details.](#ff7e5e)'
error_invalid_importer: '[Error:](#ff3300) [Invalid importer. Please check the](#ff7e5e) [plugin docs](#ff7e5e italic show_text=&#ff7e5e&Click to open link open_url=https://william278.net/docs/huskhomes/importing-data) [for more details.](#ff7e5e)'
error_home_name_taken: '[Error:](#ff3300) [You already have a home set with that name.](#ff7e5e)'
error_home_name_length: '[Error:](#ff3300) [Home names can only contain up to 16 characters!](#ff7e5e)'
error_home_name_characters: '[Error:](#ff3300) [Home names must be alphanumeric (A-Z, 0-9, -_)](#ff7e5e)'
@@ -98,6 +98,10 @@ map_hook_public_homes_marker_set_name: 'Öffentliche Homes'
map_hook_warps_marker_set_name: 'Warps'
up_to_date: '[HuskHomes](#00fb9a bold) [| Du verwendest die neueste Version von HuskHomes (v%1%).](#00fb9a)'
update_available: '[HuskHomes](#ff7e5e bold) [| Eine neue Version von HuskHomes ist verfügbar: v%1% (Deine Version: v%2%).](#ff7e5e)'
importer_list_title: '[HuskHomes](#00fb9a bold) [| Available Data Importers:](#00fb9a)\n'
importer_list_item: '[%1%](#00fb9a show_text=&#00fb9a&Click to import data through this importer. suggest_command=/huskhomes:huskhomes import start %1%) [⏩ %2%](white show_text=&#00fb9a&This importer supports importing:\n&f%2% suggest_command=/huskhomes:huskhomes import start %1%)'
error_no_importers_available: '[Error:](#ff3300) [No importers are currently available. Please check the](#ff7e5e) [plugin docs](#ff7e5e italic show_text=&#ff7e5e&Click to open link open_url=https://william278.net/docs/huskhomes/importing-data) [for more details.](#ff7e5e)'
error_invalid_importer: '[Error:](#ff3300) [Invalid importer. Please check the](#ff7e5e) [plugin docs](#ff7e5e italic show_text=&#ff7e5e&Click to open link open_url=https://william278.net/docs/huskhomes/importing-data) [for more details.](#ff7e5e)'
error_home_name_taken: '[Fehler:](#ff3300) [Du hast bereits ein Home mit diesem Namen gesetzt.](#ff7e5e)'
error_home_name_length: '[Fehler:](#ff3300) [Home-Namen dürfen nur bis zu 16 Zeichen enthalten!](#ff7e5e)'
error_home_name_characters: '[Fehler:](#ff3300) [Home-Namen müssen alphanumerisch sein (A-Z, 0-9, -_)!](#ff7e5e)'
+4 -1
View File
@@ -98,7 +98,10 @@ map_hook_public_homes_marker_set_name: 'Public Homes'
map_hook_warps_marker_set_name: 'Warps'
up_to_date: '[HuskHomes](#00fb9a bold) [| You are running the latest version of HuskHomes (v%1%).](#00fb9a)'
update_available: '[HuskHomes](#ff7e5e bold) [| A new version of HuskHomes is available: v%1% (running: v%2%).](#ff7e5e)'
error_home_name_taken: '[Error:](#ff3300) [You already have a home set with that name.](#ff7e5e)'
importer_list_title: '[HuskHomes](#00fb9a bold) [| Available Data Importers:](#00fb9a)\n'
importer_list_item: '[%1%](#00fb9a show_text=&#00fb9a&Click to import data through this importer. suggest_command=/huskhomes:huskhomes import start %1%) [⏩ %2%](white show_text=&#00fb9a&This importer supports importing:\n&f%2% suggest_command=/huskhomes:huskhomes import start %1%)'
error_no_importers_available: '[Error:](#ff3300) [No importers are currently available. Please check the](#ff7e5e) [plugin docs](#ff7e5e italic show_text=&#ff7e5e&Click to open link open_url=https://william278.net/docs/huskhomes/importing-data) [for more details.](#ff7e5e)'
error_invalid_importer: '[Error:](#ff3300) [Invalid importer. Please check the](#ff7e5e) [plugin docs](#ff7e5e italic show_text=&#ff7e5e&Click to open link open_url=https://william278.net/docs/huskhomes/importing-data) [for more details.](#ff7e5e)'
error_home_name_length: '[Error:](#ff3300) [Home names can only contain up to 16 characters!](#ff7e5e)'
error_home_name_characters: '[Error:](#ff3300) [Home names must be alphanumeric (A-Z, 0-9, -_)](#ff7e5e)'
error_warp_name_taken: '[Error:](#ff3300) [There is already a warp set with that name.](#ff7e5e)'
@@ -98,6 +98,10 @@ map_hook_public_homes_marker_set_name: 'Public Homes'
map_hook_warps_marker_set_name: 'Warps'
up_to_date: '[HuskHomes](#00fb9a bold) [| You are running the latest version of HuskHomes (v%1%).](#00fb9a)'
update_available: '[HuskHomes](#ff7e5e bold) [| A new version of HuskHomes is available: v%1% (running: v%2%).](#ff7e5e)'
importer_list_title: '[HuskHomes](#00fb9a bold) [| Available Data Importers:](#00fb9a)\n'
importer_list_item: '[%1%](#00fb9a show_text=&#00fb9a&Click to import data through this importer. suggest_command=/huskhomes:huskhomes import start %1%) [⏩ %2%](white show_text=&#00fb9a&This importer supports importing:\n&f%2% suggest_command=/huskhomes:huskhomes import start %1%)'
error_no_importers_available: '[Error:](#ff3300) [No importers are currently available. Please check the](#ff7e5e) [plugin docs](#ff7e5e italic show_text=&#ff7e5e&Click to open link open_url=https://william278.net/docs/huskhomes/importing-data) [for more details.](#ff7e5e)'
error_invalid_importer: '[Error:](#ff3300) [Invalid importer. Please check the](#ff7e5e) [plugin docs](#ff7e5e italic show_text=&#ff7e5e&Click to open link open_url=https://william278.net/docs/huskhomes/importing-data) [for more details.](#ff7e5e)'
error_home_name_taken: '[Error:](#ff3300) [Ya tienes una casa con ese nombre.](#ff7e5e)'
error_home_name_length: '[Error:](#ff3300) [Los nombres de las casas sólo pueden contener hasta 16 caracteres.](#ff7e5e)'
error_home_name_characters: '[Error:](#ff3300) [Los nombres de las casas deben ser alfanuméricos (A-Z, 0-9, -_)](#ff7e5e)'
@@ -98,6 +98,10 @@ map_hook_public_homes_marker_set_name: 'Home pubbliche'
map_hook_warps_marker_set_name: 'Warp'
up_to_date: '[HuskHomes](#00fb9a bold) [| Il plugin è all''ultima versione disponibile (v%1%).](#00fb9a)'
update_available: '[HuskHomes](#ff7e5e bold) [| Disponibile una nuova versione: v%1% (running: v%2%).](#ff7e5e)'
importer_list_title: '[HuskHomes](#00fb9a bold) [| Available Data Importers:](#00fb9a)\n'
importer_list_item: '[%1%](#00fb9a show_text=&#00fb9a&Click to import data through this importer. suggest_command=/huskhomes:huskhomes import start %1%) [⏩ %2%](white show_text=&#00fb9a&This importer supports importing:\n&f%2% suggest_command=/huskhomes:huskhomes import start %1%)'
error_no_importers_available: '[Error:](#ff3300) [No importers are currently available. Please check the](#ff7e5e) [plugin docs](#ff7e5e italic show_text=&#ff7e5e&Click to open link open_url=https://william278.net/docs/huskhomes/importing-data) [for more details.](#ff7e5e)'
error_invalid_importer: '[Error:](#ff3300) [Invalid importer. Please check the](#ff7e5e) [plugin docs](#ff7e5e italic show_text=&#ff7e5e&Click to open link open_url=https://william278.net/docs/huskhomes/importing-data) [for more details.](#ff7e5e)'
error_home_name_taken: '[Errore:](#ff3300) [Hai già una home impostata con quel nome.](#ff7e5e)'
error_home_name_length: '[Errore:](#ff3300) [I nomi delle home possono essere lunghi massimo 16 caratteri!](#ff7e5e)'
error_home_name_characters: '[Errore:](#ff3300) [I nomi delle home devono essere alfanumerici (A-Z, 0-9, -_)](#ff7e5e)'
@@ -98,6 +98,10 @@ map_hook_public_homes_marker_set_name: 'Public Homes'
map_hook_warps_marker_set_name: 'Warps'
up_to_date: '[HuskHomes](#00fb9a bold) [| You are running the latest version of HuskHomes (v%1%).](#00fb9a)'
update_available: '[HuskHomes](#ff7e5e bold) [| A new version of HuskHomes is available: v%1% (running: v%2%).](#ff7e5e)'
importer_list_title: '[HuskHomes](#00fb9a bold) [| Available Data Importers:](#00fb9a)\n'
importer_list_item: '[%1%](#00fb9a show_text=&#00fb9a&Click to import data through this importer. suggest_command=/huskhomes:huskhomes import start %1%) [⏩ %2%](white show_text=&#00fb9a&This importer supports importing:\n&f%2% suggest_command=/huskhomes:huskhomes import start %1%)'
error_no_importers_available: '[Error:](#ff3300) [No importers are currently available. Please check the](#ff7e5e) [plugin docs](#ff7e5e italic show_text=&#ff7e5e&Click to open link open_url=https://william278.net/docs/huskhomes/importing-data) [for more details.](#ff7e5e)'
error_invalid_importer: '[Error:](#ff3300) [Invalid importer. Please check the](#ff7e5e) [plugin docs](#ff7e5e italic show_text=&#ff7e5e&Click to open link open_url=https://william278.net/docs/huskhomes/importing-data) [for more details.](#ff7e5e)'
error_home_name_taken: '[Error:](#ff3300) [You already have a home set with that name.](#ff7e5e)'
error_home_name_length: '[Error:](#ff3300) [Home names can only contain up to 16 characters!](#ff7e5e)'
error_home_name_characters: '[Error:](#ff3300) [Home names must be alphanumeric (A-Z, 0-9, -_)](#ff7e5e)'
@@ -98,6 +98,10 @@ map_hook_public_homes_marker_set_name: 'Public Homes'
map_hook_warps_marker_set_name: 'Warps'
up_to_date: '[HuskHomes](#00fb9a bold) [| You are running the latest version of HuskHomes (v%1%).](#00fb9a)'
update_available: '[HuskHomes](#ff7e5e bold) [| A new version of HuskHomes is available: v%1% (running: v%2%).](#ff7e5e)'
importer_list_title: '[HuskHomes](#00fb9a bold) [| Available Data Importers:](#00fb9a)\n'
importer_list_item: '[%1%](#00fb9a show_text=&#00fb9a&Click to import data through this importer. suggest_command=/huskhomes:huskhomes import start %1%) [⏩ %2%](white show_text=&#00fb9a&This importer supports importing:\n&f%2% suggest_command=/huskhomes:huskhomes import start %1%)'
error_no_importers_available: '[Error:](#ff3300) [No importers are currently available. Please check the](#ff7e5e) [plugin docs](#ff7e5e italic show_text=&#ff7e5e&Click to open link open_url=https://william278.net/docs/huskhomes/importing-data) [for more details.](#ff7e5e)'
error_invalid_importer: '[Error:](#ff3300) [Invalid importer. Please check the](#ff7e5e) [plugin docs](#ff7e5e italic show_text=&#ff7e5e&Click to open link open_url=https://william278.net/docs/huskhomes/importing-data) [for more details.](#ff7e5e)'
error_home_name_taken: '[Hata:](#ff3300) [Bu ada sahip bir eviniz zaten var.](#ff7e5e)'
error_home_name_length: '[Hata:](#ff3300) [Ev adları en fazla 16 karakter içerebilir!](#ff7e5e)'
error_home_name_characters: '[Hata:](#ff3300) [Ev adları alfanümerik olmalıdır (A-Z, 0-9, -_)](#ff7e5e)'
@@ -98,6 +98,10 @@ map_hook_public_homes_marker_set_name: 'Public Homes'
map_hook_warps_marker_set_name: 'Warps'
up_to_date: '[HuskHomes](#00fb9a bold) [| You are running the latest version of HuskHomes (v%1%).](#00fb9a)'
update_available: '[HuskHomes](#ff7e5e bold) [| A new version of HuskHomes is available: v%1% (running: v%2%).](#ff7e5e)'
importer_list_title: '[HuskHomes](#00fb9a bold) [| Available Data Importers:](#00fb9a)\n'
importer_list_item: '[%1%](#00fb9a show_text=&#00fb9a&Click to import data through this importer. suggest_command=/huskhomes:huskhomes import start %1%) [⏩ %2%](white show_text=&#00fb9a&This importer supports importing:\n&f%2% suggest_command=/huskhomes:huskhomes import start %1%)'
error_no_importers_available: '[Error:](#ff3300) [No importers are currently available. Please check the](#ff7e5e) [plugin docs](#ff7e5e italic show_text=&#ff7e5e&Click to open link open_url=https://william278.net/docs/huskhomes/importing-data) [for more details.](#ff7e5e)'
error_invalid_importer: '[Error:](#ff3300) [Invalid importer. Please check the](#ff7e5e) [plugin docs](#ff7e5e italic show_text=&#ff7e5e&Click to open link open_url=https://william278.net/docs/huskhomes/importing-data) [for more details.](#ff7e5e)'
error_home_name_taken: '[Error:](#ff3300) [You already have a home set with that name.](#ff7e5e)'
error_home_name_length: '[Error:](#ff3300) [Home names can only contain up to 16 characters!](#ff7e5e)'
error_home_name_characters: '[Error:](#ff3300) [Home names must be alphanumeric (A-Z, 0-9, -_)](#ff7e5e)'
@@ -98,6 +98,10 @@ map_hook_public_homes_marker_set_name: '公开的家'
map_hook_warps_marker_set_name: '地标'
up_to_date: '[HuskHomes](#00fb9a bold) [| 你正在使用最新版本的HuskHomes (v%1%).](#00fb9a)'
update_available: '[HuskHomes](#ff7e5e bold) [| 一个新版本的HuskHomes已经可以更新: v%1% (当前: v%2%).](#ff7e5e)'
importer_list_title: '[HuskHomes](#00fb9a bold) [| Available Data Importers:](#00fb9a)\n'
importer_list_item: '[%1%](#00fb9a show_text=&#00fb9a&Click to import data through this importer. suggest_command=/huskhomes:huskhomes import start %1%) [⏩ %2%](white show_text=&#00fb9a&This importer supports importing:\n&f%2% suggest_command=/huskhomes:huskhomes import start %1%)'
error_no_importers_available: '[Error:](#ff3300) [No importers are currently available. Please check the](#ff7e5e) [plugin docs](#ff7e5e italic show_text=&#ff7e5e&Click to open link open_url=https://william278.net/docs/huskhomes/importing-data) [for more details.](#ff7e5e)'
error_invalid_importer: '[Error:](#ff3300) [Invalid importer. Please check the](#ff7e5e) [plugin docs](#ff7e5e italic show_text=&#ff7e5e&Click to open link open_url=https://william278.net/docs/huskhomes/importing-data) [for more details.](#ff7e5e)'
error_home_name_taken: '[错误:](#ff3300) [已有一个相同名称的家.](#ff7e5e)'
error_home_name_length: '[错误:](#ff3300) [家的名称只能输入16个字符!](#ff7e5e)'
error_home_name_characters: '[错误:](#ff3300) [家的名称只能使用这些字符: (A-Z, 0-9, -_)](#ff7e5e)'
@@ -98,6 +98,10 @@ map_hook_public_homes_marker_set_name: '公開的家'
map_hook_warps_marker_set_name: '地標'
up_to_date: '[HuskHomes](#00fb9a bold) [| 您運行的是最新版本的 HuskHomes (v%1%).](#00fb9a)'
update_available: '[HuskHomes](#ff7e5e bold) [| 發現可用的新版本: v%1% (running: v%2%).](#ff7e5e)'
importer_list_title: '[HuskHomes](#00fb9a bold) [| Available Data Importers:](#00fb9a)\n'
importer_list_item: '[%1%](#00fb9a show_text=&#00fb9a&Click to import data through this importer. suggest_command=/huskhomes:huskhomes import start %1%) [⏩ %2%](white show_text=&#00fb9a&This importer supports importing:\n&f%2% suggest_command=/huskhomes:huskhomes import start %1%)'
error_no_importers_available: '[Error:](#ff3300) [No importers are currently available. Please check the](#ff7e5e) [plugin docs](#ff7e5e italic show_text=&#ff7e5e&Click to open link open_url=https://william278.net/docs/huskhomes/importing-data) [for more details.](#ff7e5e)'
error_invalid_importer: '[Error:](#ff3300) [Invalid importer. Please check the](#ff7e5e) [plugin docs](#ff7e5e italic show_text=&#ff7e5e&Click to open link open_url=https://william278.net/docs/huskhomes/importing-data) [for more details.](#ff7e5e)'
error_home_name_taken: '[錯誤:](#ff3300) [已有一個相同名稱的家.](#ff7e5e)'
error_home_name_length: '[錯誤:](#ff3300) [家名稱最多只能包含16個字符!](#ff7e5e)'
error_home_name_characters: '[錯誤:](#ff3300) [家名稱只能使用這些字符: (A-Z, 0-9, -_)](#ff7e5e)'
+90
View File
@@ -0,0 +1,90 @@
_Command conflicts_ can arise when you have multiple plugins providing similar commands.
For instance, if you have both [EssentialsX](https://essentialsx.net/) and HuskHomes installed, you will have two `/home` commands. This can cause issues when players try to use the command, as the server will prioritise whichever plugin loaded first. In the case of Essentials, this means that players will be teleported to their Essentials home(s) instead of their HuskHomes home.
This page discusses how to circumnavigate this issue.
## Fallback namespace
> **Applies to:** Spigot, Paper, Fabric, Sponge
All commands are registered with a fallback namespace, so that you can still access them. For instance, `/minecraft:tp` will run the default Minecraft teleport command, while `/huskhomes:tp` will run HuskHomes' tp command.
If you have multiple home commands on your server, for instance, you can therefore use `/huskhomes:home` to run HuskHomes' home command instead of, for instance, Essentials'. However, this is a bit ugly and can be confusing for players to understand, so read below for how to create aliases to make this easier.
## Editing Commands.yml
> **Applies to:** Spigot, Paper
Spigot provides a [`commands.yml` file](https://bukkit.fandom.com/wiki/Commands.yml) which lets you define custom aliases for commands. This not only lets you define additional shortcuts for plugin commands, but also determine which commands should take priority during execution.
### Overrides for HuskHomes
Add the alias pack below to your `commands.yml` file's aliases section to ensure HuskHomes' commands take priority over other plugins' commands. This works by defining an alias for each un-namespaced command to the version with a fallback namespace.
Note that if you _want_ other plugin commands to take precedence over HuskHomes, you can swap out the `- "huskhomes:` prefix for the other plugin's identifier (e.g. for EssentialsX, use `- "essentials:`).
<details>
<summary>HuskHomes aliases for commands.yml</summary>
```yaml
aliases:
home:
- "huskhomes:home $1-"
sethome:
- "huskhomes:sethome $1-"
homelist:
- "huskhomes:homelist $1-"
homes:
- "huskhomes:homelist $1-"
delhome:
- "huskhomes:delhome $1-"
edithome:
- "huskhomes:edithome $1-"
phome:
- "huskhomes:phome $1-"
phomelist:
- "huskhomes:phomelist $1-"
warp:
- "huskhomes:warp $1-"
setwarp:
- "huskhomes:setwarp $1-"
warplist:
- "huskhomes:warplist $1-"
delwarp:
- "huskhomes:delwarp $1-"
editwarp:
- "huskhomes:editwarp $1-"
tp:
- "huskhomes:tp $1-"
tphere:
- "huskhomes:tphere $1-"
tpa:
- "huskhomes:tpa $1-"
tpahere:
- "huskhomes:tpahere $1-"
tpaccept:
- "huskhomes:tpaccept $1-"
tpyes:
- "huskhomes:tpaccept $1-"
tpdecline:
- "huskhomes:tpdecline $1-"
tpno:
- "huskhomes:tpdecline $1-"
rtp:
- "huskhomes:rtp $1-"
tpignore:
- "huskhomes:tpignore $1-"
tpoffline:
- "huskhomes:tpoffline $1-"
tpall:
- "huskhomes:tpall $1-"
tpaall:
- "huskhomes:tpaall $1-"
spawn:
- "huskhomes:spawn $1-"
setspawn:
- "huskhomes:setspawn $1-"
back:
- "huskhomes:back $1-"
huskhomes:
- "huskhomes:huskhomes $1-"
```
</details>
+99 -89
View File
@@ -1,51 +1,59 @@
HuskHomes provides a range of commands for you to use. This page will detail the permissions for each command
to [let you manage access](managing-access) to the plugin's different features.
HuskHomes provides a range of commands for you to use. This page will detail the permissions for each command to [let you manage access](managing-access) to the plugin's different features.
## Commands & Permissions Table
> **[[Command Conflicts]]:** If you have multiple plugins providing similar commands, you may need to [create aliases](command-conflicts) to ensure HuskHomes' commands take priority.
This is a table of HuskHomes' commands and their required permission nodes. Additional permissions provided by the
plugin to control other variables are detailed further below!
This is a table of HuskHomes' commands and their required permission nodes. Additional permissions provided by the plugin to control other variables are detailed further below!
| Command | Aliases | Description | Base Permission&dagger; |
|-----------------------------------------------------------------|------------------------------|-----------------------------------------------------|-------------------------------|
| `/home <name>` | | Teleport to a home | `huskhomes.command.home` |
| `/sethome <name>` | | Set a new home with given name | `huskhomes.command.sethome` |
| `/homelist [page]` | `/homes` | Get a list of your homes | `huskhomes.command.homelist` |
| `/delhome <name>` | | Delete a home you previously set | `huskhomes.command.delhome` |
| `/edithome <name> [rename/description/relocate/privacy] [args]` | | Edit one of your homes | `huskhomes.command.edithome` |
| `/phome [<owner_name.home_name>]` | `/publichome` | Teleport to a public home | `huskhomes.command.phome` |
| `/phomelist [page]` | `/publichomelist`, `/phomes` | View the list of public homes | `huskhomes.command.phomelist` |
| `/warp <name>` | | Teleport to a warp | `huskhomes.command.warp` |
| `/setwarp <name>` | | Set a new warp with given name | `huskhomes.command.setwarp` |
| `/warplist [page]` | `/warps` | View the list of warps | `huskhomes.command.warplist` |
| `/delwarp <name>` | | Delete a warp | `huskhomes.command.delwarp` |
| `/editwarp <name> [rename/description/relocate] [args]` | | Edit a warp | `huskhomes.command.editwarp` |
| `/tp <target> [destination]` | `/tpo` | Teleport to another player or location | `huskhomes.command.tp` |
| `/tphere <player>` | `/tpohere` | Teleport another player to you | `huskhomes.command.tphere` |
| `/tpa <player>` | | Request to teleport to another player | `huskhomes.command.tpa` |
| `/tpahere <player>` | | Request another player to teleport to you | `huskhomes.command.tpahere` |
| `/tpaccept [player]` | `/tpyes` | Accept a teleport request | `huskhomes.command.tpaccept` |
| `/tpdecline [player]` | `/tpdeny`, `/tpno` | Decline a teleport request | `huskhomes.command.tpdecline` |
| `/rtp [player] [world]` | | Teleport randomly into the wild | `huskhomes.command.rtp` |
| `/tpignore` | | Ignore incoming teleport requests | `huskhomes.command.tpignore` |
| `/tpoffline <player>` | | Teleport to where a player was last online | `huskhomes.command.tpoffline` |
| `/tpall` | | Teleport everyone to your position | `huskhomes.command.tpall` |
| `/tpaall` | | Request that everyone teleports to you | `huskhomes.command.tpaall` |
| `/spawn` | | Teleport to spawn | `huskhomes.command.spawn` |
| `/setspawn` | | Set the spawn position | `huskhomes.command.setspawn` |
| `/back` | | Return to your previous position, or where you died | `huskhomes.command.back` |
| `/huskhomes [about/help/reload/update]` | | View plugin information & reload configs | `huskhomes.command.huskhomes` |
| Command | Description | Base Permission | Default |
|-----------------------------------------------------------------|-----------------------------------------------------|-------------------------------|:-------:|
| `/home <name>` | Teleport to a home | `huskhomes.command.home` | ✅ |
| `/homelist [page]` | Get a list of your homes | `huskhomes.command.homelist` | ✅ |
| `/sethome <name>` | Set a new home with given name | `huskhomes.command.sethome` | ✅ |
| `/delhome <name>` | Delete a home you previously set | `huskhomes.command.delhome` | ✅ |
| `/edithome <name> [rename/description/relocate/privacy] [args]` | Edit one of your homes | `huskhomes.command.edithome` | ✅ |
| `/phome [<owner_name.home_name>]` | Teleport to a public home | `huskhomes.command.phome` | ✅ |
| `/phomelist [page]` | View the list of public homes | `huskhomes.command.phomelist` | ✅ |
| `/warp <name>` | Teleport to a warp | `huskhomes.command.warp` | ✅ |
| `/warplist [page]` | View the list of warps | `huskhomes.command.warplist` | ✅ |
| `/setwarp <name>` | Set a new warp with given name | `huskhomes.command.setwarp` | ❌ |
| `/delwarp <name>` | Delete a warp | `huskhomes.command.delwarp` | ❌ |
| `/editwarp <name> [rename/description/relocate] [args]` | Edit a warp | `huskhomes.command.editwarp` | ❌ |
| `/tp <target> [destination]` | Teleport to another player or location | `huskhomes.command.tp` | ❌ |
| `/tphere <player>` | Teleport another player to you | `huskhomes.command.tphere` | ❌ |
| `/tpa <player>` | Request to teleport to another player | `huskhomes.command.tpa` | ✅ |
| `/tpahere <player>` | Request another player to teleport to you | `huskhomes.command.tpahere` | ✅ |
| `/tpaccept [player]` | Accept a teleport request | `huskhomes.command.tpaccept` | ✅ |
| `/tpdecline [player]` | Decline a teleport request | `huskhomes.command.tpdecline` | ✅ |
| `/rtp [player] [world]` | Teleport randomly into the wild | `huskhomes.command.rtp` | ✅ |
| `/tpignore` | Ignore incoming teleport requests | `huskhomes.command.tpignore` | ✅ |
| `/tpoffline <player>` | Teleport to where a player was last online | `huskhomes.command.tpoffline` | ❌ |
| `/tpall` | Teleport everyone to your position | `huskhomes.command.tpall` | ❌ |
| `/tpaall` | Request that everyone teleports to you | `huskhomes.command.tpaall` | ❌ |
| `/spawn` | Teleport to spawn | `huskhomes.command.spawn` | ✅ |
| `/setspawn` | Set the spawn position | `huskhomes.command.setspawn` | ❌ |
| `/back` | Return to your previous position, or where you died | `huskhomes.command.back` | ✅ |
| `/huskhomes [about/help/reload/import/update]` | View plugin information & reload configs | `huskhomes.command.huskhomes` | ✅ |
&dagger;Required permission for basic command execution; some commands require additional permissions for certain
functions (See below&hellip;)
* **Base Permission** &mdash; Required permission for basic command execution; some commands require additional permissions for certain functions (See below&hellip;)
* **Default** &mdash; ✅ = Accessible by all players by default &mdash; ❌ = Accessible only by server operators by default.
### Command Aliases
The following commands have aliases that can also be used for convenience:
| Command | Aliases |
|--------------|------------------------------|
| `/homelist` | `/homes` |
| `/phome` | `/publichome` |
| `/phomelist` | `/phomes`, `/publichomelist` |
| `/warplist` | `/warps` |
| `/tp` | `/tpo` |
| `/tpaccept` | `/tpyes` |
| `/tpdecline` | `/tpno`, `/tpdeny` |
## Disabling Commands
If you'd like to disable a command, add it to the `disabled_commands` section of your config file as detailed below.
Note that on servers running Paper for versions earlier than Minecraft 1.19.4, or servers just running plain Spigot
instead of Paper (not recommended&mdash;please upgrade to Paper!), disabled commands will still be _registered_ but a
disabled command message will appear. On servers running Paper for Minecraft 1.19.4+, HuskHomes will be registered as a
Paper Plugin (and will appear as such in the `/plugins` menu) and disabled commands will not be registered at all.
If you'd like to disable a command, add it to the `disabled_commands` section of your config file as detailed below. Note that on servers running Paper for versions earlier than Minecraft 1.19.4, or servers just running plain Spigot instead of Paper (not recommended&mdash;please upgrade to Paper!), disabled commands will still be _registered_ but a disabled command message will appear. On servers running Paper for Minecraft 1.19.4+, HuskHomes will be registered as a Paper Plugin (and will appear as such in the `/plugins` menu) and disabled commands will not be registered at all.
<details>
<summary>Disabling a command in config.yml</summary>
@@ -57,85 +65,87 @@ disabled_commands: [ '/rtp' ]
</details>
## Other Permissions
### Changing set home, public home & free home limits
You can modify the maximum number of homes, the allotment of free homes and the number of public homes a user can set
through permission nodes.
## Home Limits
You can modify the maximum number of homes, the allotment of free homes and the number of public homes a user can set through permission nodes.
* `huskhomes.max_homes.<amount>` — Determines the max number of homes a user can set
* `huskhomes.free_homes.<amount>` — Determines the allotment of homes the user can set for free, before they have to
pay&dagger;
* `huskhomes.free_homes.<amount>` — Determines the allotment of homes the user can set for free, before they have to pay&dagger;
* `huskhomes.max_public_homes.<amount>` — Determines the maximum number of homes a user can make public
&dagger;Only effective on servers that make use of the economy hook.
If users have multiple permission nodes (i.e. from being in multiple permission groups), HuskHomes will accept the
highest. If you would prefer the nodes to _stack_, you can set the `stack_permission_limits` setting in the plugin
config file to `true` (under `general`).
If users have multiple permission nodes (i.e. from being in multiple permission groups), HuskHomes will accept the highest. If you prefer that the nodes _stack_, you can set the `stack_permission_limits` setting in the plugin config file to `true` (under `general`).
Note that these permission-set values override the values set in the plugin config (`max_homes`, `max_public_homes`
under `general` and `free_homes` under `economy`).
Note that these permission-set values override the values set in the plugin config (`max_homes`, `max_public_homes` under `general` and `free_homes` under `economy`).
### Return by death on /back
## Other Permissions
<details>
<summary>Return to where you died with /back</summary>
This permission controls whether users can return to where they died. Note that return by death must be enabled in the
config for this to work.
| Permission | Command | Description |
| Permission | Command | Description |
|--------------------------------|---------|---------------------------------------|
| `huskhomes.command.back.death` | `/back` | Use /back to return to where you died |
</details>
### Home privacy
<details>
<summary>Home privacy</summary>
These permissions allow you to make a home public/private (toggling its privacy). There are also permissions that let
you use, edit and delete homes that have not been set publicly.
| Permission | Command | Description |
These permissions allow you to make a home public/private (toggling its privacy). There are also permissions that let you use, edit and delete homes that have not been set publicly.
| Permission | Command | Description |
|--------------------------------------|-------------------------------------------------------------------------------------|----------------------------------------------|
| `huskhomes.command.edithome.privacy` | `/edithome <name> privacy [public/private]` |
Modify the privacy of a home |
| `huskhomes.command.home.other` | `/homelist <player> [page]` |
View a list of a user's homes |
| `huskhomes.command.home.other` | `/home [<owner_name>.<home_name>]` |
Teleport to a user's home, public or private |
| `huskhomes.command.edithome.other` | `/edithome [<owner_name>.<home_name>] [rename/description/relocate/privacy] [args]` |
Edit a user's home |
| `huskhomes.command.delhome.other` | `/delhome [<owner_name>.<home_name>]` |
Delete a user's home |
| `huskhomes.command.edithome.privacy` | `/edithome <name> privacy [public/private]` | Modify the privacy of a home |
| `huskhomes.command.home.other` | `/homelist <player> [page]` | View a list of a user's homes |
| `huskhomes.command.home.other` | `/home [<owner_name>.<home_name>]` | Teleport to a user's home, public or private |
| `huskhomes.command.edithome.other` | `/edithome [<owner_name>.<home_name>] [rename/description/relocate/privacy] [args]` | Edit a user's home |
| `huskhomes.command.delhome.other` | `/delhome [<owner_name>.<home_name>]` | Delete a user's home |
</details>
### Cooldown, warmup and economy bypasses
<details>
<summary>Cooldown, warmup and economy bypasses</summary>
These permissions let you bypass teleportation warmup checks, rtp cooldown checks and economy checks
| Permission | Description |
| Permission | Description |
|------------------------------------|--------------------------------------------|
| `huskhomes.bypass_teleport_warmup` | Bypass timed teleportation warmups&dagger; |
| `huskhomes.bypass_economy_checks` | Bypass economy checks |
| `huskhomes.rtp.bypass_cooldown` | Bypass the cooldown on /rtp&ddagger; |
| `huskhomes.bypass_economy_checks` | Bypass economy checks |
| `huskhomes.rtp.bypass_cooldown` | Bypass the cooldown on /rtp&ddagger; |
&dagger;This is not effective when the teleport warmup time is set `<= 0` in the config file.
&ddagger;This is not effective when the /rtp cooldown time is set `<= 0` in the config file.
</details>
### Advanced teleportation
<details>
<summary>Advanced teleportation</summary>
These permissions allow you to use /tp and /rtp to teleport other players remotely and to coordinates.
| Permission | Command | Description |
|------------------------------------|---------------------------------------------|-------------------------------------|
| `huskhomes.command.tp.other` | `/tp [player] [target] ` | Teleport another player |
| `huskhomes.command.tp.coordinates` | `/tp [player] <x> <y> <z> [world] [server]` | Teleport to a set of coordinates. |
| `huskhomes.command.rtp.other` | `/rtp [player] [world]` | Randomly teleport another player. |
| `huskhomes.command.rtp.world` | `/rtp [player] [world]` | Randomly teleport in a specific
world. |
| `huskhomes.command.spawn.other` | `/spawn [player]` | Teleport another player to spawn. |
| `huskhomes.command.warp.other` | `/warp [name] [player]` | Teleport another player to a
warp. |
### /huskhomes command arguments
| Permission | Command | Description |
|------------------------------------|---------------------------------------------|----------------------------------------|
| `huskhomes.command.tp.other` | `/tp [player] [target] ` | Teleport another player |
| `huskhomes.command.tp.coordinates` | `/tp [player] <x> <y> <z> [world] [server]` | Teleport to a set of coordinates. |
| `huskhomes.command.rtp.other` | `/rtp [player] [world]` | Randomly teleport another player. |
| `huskhomes.command.rtp.world` | `/rtp [player] [world]` | Randomly teleport in a specific world. |
| `huskhomes.command.spawn.other` | `/spawn [player]` | Teleport another player to spawn. |
| `huskhomes.command.warp.other` | `/warp [name] [player]` | Teleport another player to a warp. |
</details>
<details>
<summary>/huskhomes command arguments</summary>
These permissions control what arguments of the /huskhomes command a user may use.
| Permission | Command | Description |
| Permission | Command | Description |
|--------------------------------------|--------------------------|--------------------------------------------|
| `huskhomes.command.huskhomes.help` | `/huskhomes help [page]` | View a list of HuskHomes commands |
| `huskhomes.command.huskhomes.about` | `/huskhomes [about]` | View the plugin about menu |
| `huskhomes.command.huskhomes.help` | `/huskhomes help [page]` | View a list of HuskHomes commands |
| `huskhomes.command.huskhomes.about` | `/huskhomes [about]` | View the plugin about menu |
| `huskhomes.command.huskhomes.reload` | `/huskhomes reload` | Reload the plugin config and message files |
| `huskhomes.command.huskhomes.update` | `/huskhomes update` | Check for updates |
| `huskhomes.command.huskhomes.update` | `/huskhomes update` | Check for updates |
</details>
+8 -4
View File
@@ -3,14 +3,15 @@ Welcome to the plugin documentation for HuskHomes v3.x+, the home and teleportat
## Guides
* 📚 [[Setup]]
* 📦 [[Legacy Migration]] (*v2 → v3*)
* 📊 [[Importing Data]]
* 📄 [[Config Files]]
* 📝 [[Translations]]
* ⛔ [[Managing Access]]
* 🖥️ [[Commands]]
* 📜 [[Command Conflicts]]
## Documentation
* ⛅ [[Redis Support]]
* 📝 [[Translations]]
* 🟩 [[Plan Hook]]
* 🗺️ [[Map Hooks]]
* 💵 [[Economy Hook]]
@@ -20,14 +21,17 @@ Welcome to the plugin documentation for HuskHomes v3.x+, the home and teleportat
* 🌎 [[Global Spawn]]
* ✍️ [[Placeholders]]
* ⭐ [[GUI Add-on]]
* 🕸️ [[Legacy Migration]] (*v2 → v3*)
* 📦 [[API]]
* 💡 [[API Examples]]
* ❗ [[API Events]]
## Links
* 💻 [GitHub](https://github.com/WiIIiam278/HuskHomes2)
* 📂 [Downloads](https://www.spigotmc.org/resources/huskhomes.83767/)
* 📂 [Downloads](https://william278.net/project/huskhomes/)
* 🔧 [Modrinth](https://modrinth.com/plugin/huskhomes)
* 🚰 [Spigot](https://www.spigotmc.org/resources/huskhomes.83767/)
* 🛒 [Polymart](https://polymart.org/resource/huskhomes.284/)
* 🔧 [Modrinth](https://modrinth.com/plugin/huskhomes)
* 🛫 [Hangar](https://hangar.papermc.io/William278/HuskHomes)
* 🔥 [CurseForge](https://www.curseforge.com/minecraft/mc-mods/huskhomes/)
* 💬 [Discord Support](https://discord.gg/tVYhJfyDWG)
+21
View File
@@ -0,0 +1,21 @@
> **Warning:** Imported data will overwrite any existing data in HuskHomes. Please make a backup of your database before starting an import.
HuskHomes supports importing data from other plugins/mods through the `/huskhomes import` command.
| Name | Supported Import Data | Platforms | Link |
|-----------------------------|-----------------------|--------------------|--------------------------|
| [EssentialsX](#essentialsx) | Homes, Warps, Users | Spigot, Paper | https://essentialsx.net/ |
## EssentialsX
HuskHomes supports importing Homes, Warps and User data from [EssentialsX](https://essentialsx.net/) (`v2.19.7`+).
Please note that imported data will overwrite any duplicate existing data (e.g. homes with the same name will be overwritten with imported Essentials homes). Follow the below instructions to import your data:
1. [Install the latest version of HuskHomes](setup) on your server.
2. Ensure EssentialsX v2.19.7+ is installed on your server and that user data is present. Restart your server if necessary.
3. Verify that the EssentialsX importer is available by typing `/huskhomes import list`
4. Run `/huskhomes import start EssentialsX` to start the importer. Progress will be displayed in chat and/or in console, including the amount of data that was imported.
5. Once the importer has finished, verify that the data has been imported correctly by typing `/huskhomes:warplist` and `/huskhomes:homelist <player>`
You should restart your server after completing the import.
+8 -4
View File
@@ -1,13 +1,14 @@
## Guides
* 📚 [[Setup]]
* 📦 [[Legacy Migration]] (*v2 → v3*)
* 📊 [[Importing Data]]
* 📄 [[Config Files]]
* 📝 [[Translations]]
* ⛔ [[Managing Access]]
* 🖥️ [[Commands]]
* 📜 [[Command Conflicts]]
## Documentation
* ⛅ [[Redis Support]]
* 📝 [[Translations]]
* 🟩 [[Plan Hook]]
* 🗺️ [[Map Hooks]]
* 💵 [[Economy Hook]]
@@ -17,14 +18,17 @@
* 🌎 [[Global Spawn]]
* ✍️ [[Placeholders]]
* ⭐ [[GUI Add-on]]
* 🕸️ [[Legacy Migration]] (*v2 → v3*)
* 📦 [[API]]
* 💡 [[API Examples]]
* ❗ [[API Events]]
## Links
* 💻 [GitHub](https://github.com/WiIIiam278/HuskHomes2)
* 📂 [Downloads](https://www.spigotmc.org/resources/huskhomes.83767/)
* 📂 [Downloads](https://william278.net/project/huskhomes/)
* 🔧 [Modrinth](https://modrinth.com/plugin/huskhomes)
* 🚰 [Spigot](https://www.spigotmc.org/resources/huskhomes.83767/)
* 🛒 [Polymart](https://polymart.org/resource/huskhomes.284/)
* 🔧 [Modrinth](https://modrinth.com/plugin/huskhomes)
* 🛫 [Hangar](https://hangar.papermc.io/William278/HuskHomes)
* 🔥 [CurseForge](https://www.curseforge.com/minecraft/mc-mods/huskhomes/)
* 💬 [Discord Support](https://discord.gg/tVYhJfyDWG)
+3 -2
View File
@@ -22,8 +22,8 @@ dependencies:
required: false
- name: Pl3xMap
required: false
load-before:
- name: Essentials
required: false
load-after:
- name: Vault
- name: RedisEconomy
@@ -31,4 +31,5 @@ load-after:
- name: dynmap
- name: BlueMap
- name: Plan
- name: Pl3xMap
- name: Pl3xMap
- name: Essentials