mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 22:16:08 +00:00
Fix hooks not registering properly, close #337
This commit is contained in:
2 files changed
+3
-2
No files matched your search
@@ -346,7 +346,8 @@ public interface HuskHomes extends TaskRunner, EventDispatcher {
|
||||
List<Command> registerCommands();
|
||||
|
||||
default void registerHooks() {
|
||||
final ArrayList<Hook> hooks = new ArrayList<>();
|
||||
setHooks(new ArrayList<>());
|
||||
|
||||
if (getSettings().doMapHook()) {
|
||||
if (isDependencyLoaded("Dynmap")) {
|
||||
getHooks().add(new DynmapHook(this));
|
||||
@@ -357,7 +358,6 @@ public interface HuskHomes extends TaskRunner, EventDispatcher {
|
||||
if (isDependencyLoaded("Plan")) {
|
||||
getHooks().add(new PlanHook(this));
|
||||
}
|
||||
setHooks(hooks);
|
||||
}
|
||||
|
||||
boolean isDependencyLoaded(@NotNull String name);
|
||||
|
||||
Reference in new issue
Block a user