Added softdepend to addon.yml. Removed tick delays in onEnable.
This commit is contained in:
parent
de57229d36
commit
4e32d0ab4a
|
@ -47,8 +47,6 @@ public class Warp extends Addon {
|
|||
this.setEnabled(false);
|
||||
return;
|
||||
}
|
||||
// We have to wait for the worlds to load, so we do the rest 1 tick later
|
||||
getServer().getScheduler().runTask(this.getPlugin(), () -> {
|
||||
registeredWorlds = new HashSet<>();
|
||||
// Start warp signs
|
||||
warpSignsManager = new WarpSignsManager(this, plugin);
|
||||
|
@ -56,7 +54,7 @@ public class Warp extends Addon {
|
|||
// Load the listener
|
||||
getServer().getPluginManager().registerEvents(new WarpSignsListener(this), plugin);
|
||||
// Register commands
|
||||
getServer().getScheduler().runTask(getPlugin(), () -> {
|
||||
|
||||
// BSkyBlock hook in
|
||||
this.getPlugin().getAddonsManager().getAddonByName(BSKYBLOCK).ifPresent(acidIsland -> {
|
||||
CompositeCommand bsbIslandCmd = BentoBox.getInstance().getCommandsManager().getCommand("island");
|
||||
|
@ -75,8 +73,7 @@ public class Warp extends Addon {
|
|||
registeredWorlds.add(plugin.getIWM().getWorld(ACIDISLAND));
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// Done
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@ version: 0.1
|
|||
|
||||
authors: tastybento
|
||||
|
||||
softdepend: AcidIsland, BSkyBlock
|
||||
|
||||
permissions:
|
||||
bskyblock.island.warp:
|
||||
description: Player can use warp or warps commands
|
||||
|
|
Loading…
Reference in New Issue