Updated to 0.12.0 API.

This commit is contained in:
tastybento 2018-10-30 18:26:47 -07:00
parent c14b242cbd
commit 263390deb7
2 changed files with 6 additions and 6 deletions

View File

@ -6,7 +6,7 @@
<groupId>us.tastybento</groupId> <groupId>us.tastybento</groupId>
<artifactId>Challenges</artifactId> <artifactId>Challenges</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
<name>Challenges</name> <name>Challenges</name>
<description>Challenges is an add-on for BentoBox, an expandable Minecraft Bukkit plugin for island-type games like ASkyBlock or AcidIsland.</description> <description>Challenges is an add-on for BentoBox, an expandable Minecraft Bukkit plugin for island-type games like ASkyBlock or AcidIsland.</description>
@ -71,13 +71,13 @@
<dependency> <dependency>
<groupId>world.bentobox</groupId> <groupId>world.bentobox</groupId>
<artifactId>bentobox</artifactId> <artifactId>bentobox</artifactId>
<version>0.9.0-SNAPSHOT</version> <version>0.12.0-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>bskyblock.addon</groupId> <groupId>bskyblock.addon</groupId>
<artifactId>Level</artifactId> <artifactId>Level</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.1.0-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -6,7 +6,6 @@ import bentobox.addon.challenges.commands.ChallengesCommand;
import bentobox.addon.challenges.commands.admin.Challenges; import bentobox.addon.challenges.commands.admin.Challenges;
import world.bentobox.bentobox.api.addons.Addon; import world.bentobox.bentobox.api.addons.Addon;
import world.bentobox.bentobox.api.commands.CompositeCommand; import world.bentobox.bentobox.api.commands.CompositeCommand;
import world.bentobox.bentobox.api.configuration.Config;
/** /**
* Add-on to BSkyBlock that enables challenges * Add-on to BSkyBlock that enables challenges
@ -30,7 +29,7 @@ public class ChallengesAddon extends Addon {
// Check if it is enabled - it might be loaded, but not enabled. // Check if it is enabled - it might be loaded, but not enabled.
if (getPlugin() == null || !getPlugin().isEnabled()) { if (getPlugin() == null || !getPlugin().isEnabled()) {
Bukkit.getLogger().severe("BentoBox is not available or disabled!"); Bukkit.getLogger().severe("BentoBox is not available or disabled!");
this.setEnabled(false); this.setState(State.DISABLED);
return; return;
} }
@ -48,7 +47,7 @@ public class ChallengesAddon extends Addon {
new ChallengesCommand(this, acidIslandCmd); new ChallengesCommand(this, acidIslandCmd);
CompositeCommand acidCmd = getPlugin().getCommandsManager().getCommand("acid"); CompositeCommand acidCmd = getPlugin().getCommandsManager().getCommand("acid");
new Challenges(this, acidCmd); new Challenges(this, acidCmd);
} }
}); });
this.getPlugin().getAddonsManager().getAddonByName("BSkyBlock").ifPresent(a -> { this.getPlugin().getAddonsManager().getAddonByName("BSkyBlock").ifPresent(a -> {
@ -76,6 +75,7 @@ public class ChallengesAddon extends Addon {
return challengesManager; return challengesManager;
} }
@Override
public String getPermissionPrefix() { public String getPermissionPrefix() {
return permissionPrefix ; return permissionPrefix ;
} }