mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-03 06:28:49 +00:00
feat: add status command, refactor hooks, fix EssX import
This commit is contained in:
24 files changed
+172
-53
No files matched your search
@@ -68,7 +68,7 @@ public interface HuskHomes extends Task.Supplier, EventDispatcher, SavePositionP
|
||||
default void load() {
|
||||
try {
|
||||
loadConfigs();
|
||||
loadHooks();
|
||||
loadHooks(PluginHook.Register.ON_LOAD);
|
||||
registerHooks(PluginHook.Register.ON_LOAD);
|
||||
} catch (Throwable e) {
|
||||
log(Level.SEVERE, "An error occurred whilst loading HuskHomes", e);
|
||||
@@ -90,6 +90,7 @@ public interface HuskHomes extends Task.Supplier, EventDispatcher, SavePositionP
|
||||
loadManager();
|
||||
loadRandomTeleportEngine();
|
||||
loadListeners();
|
||||
loadHooks(PluginHook.Register.ON_ENABLE);
|
||||
registerHooks(PluginHook.Register.ON_ENABLE);
|
||||
loadAPI();
|
||||
if (getPluginVersion().getMetadata().isBlank()) {
|
||||
@@ -102,6 +103,7 @@ public interface HuskHomes extends Task.Supplier, EventDispatcher, SavePositionP
|
||||
}
|
||||
log(Level.INFO, String.format("Successfully enabled HuskHomes v%s", getPluginVersion()));
|
||||
checkForUpdates();
|
||||
loadAfterLoadHooks();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -112,7 +114,7 @@ public interface HuskHomes extends Task.Supplier, EventDispatcher, SavePositionP
|
||||
default void shutdown() {
|
||||
log(Level.INFO, String.format("Disabling HuskHomes v%s...", getPluginVersion()));
|
||||
try {
|
||||
unloadHooks();
|
||||
unloadHooks(PluginHook.Register.values());
|
||||
closeDatabase();
|
||||
closeBroker();
|
||||
cancelTasks();
|
||||
|
||||
Reference in new issue
Block a user