mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-03 06:28:49 +00:00
Add EssentialsX importer, update docs (#390)
This commit is contained in:
1 parent
dba87cf428
commit
58f1dc6111
25 files changed
+581
-105
No files matched your search
@@ -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
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user