mirror of
https://github.com/BentoBoxWorld/Level.git
synced 2025-02-19 22:11:51 +01:00
Added softdepend to addon.yml. Removed 1 tick delays in onEnable()
This commit is contained in:
parent
2f268ac172
commit
c8e753af16
@ -114,30 +114,28 @@ public class Level extends Addon {
|
|||||||
// Start the top ten and register it for clicks
|
// Start the top ten and register it for clicks
|
||||||
topTen = new TopTen(this);
|
topTen = new TopTen(this);
|
||||||
registerListener(topTen);
|
registerListener(topTen);
|
||||||
// Register commands - run one tick later to allow all addons to load
|
// Register commands
|
||||||
// AcidIsland hook in
|
// AcidIsland hook in
|
||||||
getServer().getScheduler().runTask(getPlugin(), () -> {
|
this.getPlugin().getAddonsManager().getAddonByName("AcidIsland").ifPresent(a -> {
|
||||||
this.getPlugin().getAddonsManager().getAddonByName("AcidIsland").ifPresent(a -> {
|
CompositeCommand acidIslandCmd = getPlugin().getCommandsManager().getCommand("ai");
|
||||||
CompositeCommand acidIslandCmd = getPlugin().getCommandsManager().getCommand("ai");
|
if (acidIslandCmd != null) {
|
||||||
if (acidIslandCmd != null) {
|
new IslandLevel(this, acidIslandCmd);
|
||||||
new IslandLevel(this, acidIslandCmd);
|
new IslandTop(this, acidIslandCmd);
|
||||||
new IslandTop(this, acidIslandCmd);
|
CompositeCommand acidCmd = getPlugin().getCommandsManager().getCommand("acid");
|
||||||
CompositeCommand acidCmd = getPlugin().getCommandsManager().getCommand("acid");
|
new AdminLevel(this, acidCmd);
|
||||||
new AdminLevel(this, acidCmd);
|
new AdminTop(this, acidCmd);
|
||||||
new AdminTop(this, acidCmd);
|
}
|
||||||
}
|
});
|
||||||
});
|
// BSkyBlock hook in
|
||||||
// BSkyBlock hook in
|
this.getPlugin().getAddonsManager().getAddonByName("BSkyBlock").ifPresent(a -> {
|
||||||
this.getPlugin().getAddonsManager().getAddonByName("BSkyBlock").ifPresent(a -> {
|
CompositeCommand bsbIslandCmd = getPlugin().getCommandsManager().getCommand("island");
|
||||||
CompositeCommand bsbIslandCmd = getPlugin().getCommandsManager().getCommand("island");
|
if (bsbIslandCmd != null) {
|
||||||
if (bsbIslandCmd != null) {
|
new IslandLevel(this, bsbIslandCmd);
|
||||||
new IslandLevel(this, bsbIslandCmd);
|
new IslandTop(this, bsbIslandCmd);
|
||||||
new IslandTop(this, bsbIslandCmd);
|
CompositeCommand bsbAdminCmd = getPlugin().getCommandsManager().getCommand("bsbadmin");
|
||||||
CompositeCommand bsbAdminCmd = getPlugin().getCommandsManager().getCommand("bsbadmin");
|
new AdminLevel(this, bsbAdminCmd);
|
||||||
new AdminLevel(this, bsbAdminCmd);
|
new AdminTop(this, bsbAdminCmd);
|
||||||
new AdminTop(this, bsbAdminCmd);
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Register new island listener
|
// Register new island listener
|
||||||
|
@ -2,6 +2,8 @@ name: BentoBox-Level
|
|||||||
main: bentobox.addon.level.Level
|
main: bentobox.addon.level.Level
|
||||||
version: 0.1
|
version: 0.1
|
||||||
|
|
||||||
|
softdepend: AcidIsland, BSkyBlock
|
||||||
|
|
||||||
authors: tastybento
|
authors: tastybento
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
|
Loading…
Reference in New Issue
Block a user