diff --git a/src/main/java/bentobox/addon/level/Level.java b/src/main/java/bentobox/addon/level/Level.java index e64d23c..ef723c0 100644 --- a/src/main/java/bentobox/addon/level/Level.java +++ b/src/main/java/bentobox/addon/level/Level.java @@ -114,30 +114,28 @@ public class Level extends Addon { // Start the top ten and register it for clicks topTen = new TopTen(this); registerListener(topTen); - // Register commands - run one tick later to allow all addons to load + // Register commands // AcidIsland hook in - getServer().getScheduler().runTask(getPlugin(), () -> { - this.getPlugin().getAddonsManager().getAddonByName("AcidIsland").ifPresent(a -> { - CompositeCommand acidIslandCmd = getPlugin().getCommandsManager().getCommand("ai"); - if (acidIslandCmd != null) { - new IslandLevel(this, acidIslandCmd); - new IslandTop(this, acidIslandCmd); - CompositeCommand acidCmd = getPlugin().getCommandsManager().getCommand("acid"); - new AdminLevel(this, acidCmd); - new AdminTop(this, acidCmd); - } - }); - // BSkyBlock hook in - this.getPlugin().getAddonsManager().getAddonByName("BSkyBlock").ifPresent(a -> { - CompositeCommand bsbIslandCmd = getPlugin().getCommandsManager().getCommand("island"); - if (bsbIslandCmd != null) { - new IslandLevel(this, bsbIslandCmd); - new IslandTop(this, bsbIslandCmd); - CompositeCommand bsbAdminCmd = getPlugin().getCommandsManager().getCommand("bsbadmin"); - new AdminLevel(this, bsbAdminCmd); - new AdminTop(this, bsbAdminCmd); - } - }); + this.getPlugin().getAddonsManager().getAddonByName("AcidIsland").ifPresent(a -> { + CompositeCommand acidIslandCmd = getPlugin().getCommandsManager().getCommand("ai"); + if (acidIslandCmd != null) { + new IslandLevel(this, acidIslandCmd); + new IslandTop(this, acidIslandCmd); + CompositeCommand acidCmd = getPlugin().getCommandsManager().getCommand("acid"); + new AdminLevel(this, acidCmd); + new AdminTop(this, acidCmd); + } + }); + // BSkyBlock hook in + this.getPlugin().getAddonsManager().getAddonByName("BSkyBlock").ifPresent(a -> { + CompositeCommand bsbIslandCmd = getPlugin().getCommandsManager().getCommand("island"); + if (bsbIslandCmd != null) { + new IslandLevel(this, bsbIslandCmd); + new IslandTop(this, bsbIslandCmd); + CompositeCommand bsbAdminCmd = getPlugin().getCommandsManager().getCommand("bsbadmin"); + new AdminLevel(this, bsbAdminCmd); + new AdminTop(this, bsbAdminCmd); + } }); // Register new island listener diff --git a/src/main/resources/addon.yml b/src/main/resources/addon.yml index 88d232c..1cfcf1b 100755 --- a/src/main/resources/addon.yml +++ b/src/main/resources/addon.yml @@ -2,6 +2,8 @@ name: BentoBox-Level main: bentobox.addon.level.Level version: 0.1 +softdepend: AcidIsland, BSkyBlock + authors: tastybento permissions: