diff --git a/pom.xml b/pom.xml index c927e41..7d54bb8 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ world.bentobox acidisland - 1.4.0 + 1.5.0-SNAPSHOT AcidIsland AcidIsland is an add-on for BentoBox, an expandable Minecraft Bukkit plugin for island-type games like SkyBlock or AcidIsland. @@ -228,31 +228,4 @@ - - - - sonar - - https://sonarcloud.io - tastybento-github - - - - - org.sonarsource.scanner.maven - sonar-maven-plugin - 3.4.1.1168 - - - verify - - sonar - - - - - - - - \ No newline at end of file diff --git a/src/main/java/world/bentobox/acidisland/AcidIsland.java b/src/main/java/world/bentobox/acidisland/AcidIsland.java index f35d364..08b7f39 100644 --- a/src/main/java/world/bentobox/acidisland/AcidIsland.java +++ b/src/main/java/world/bentobox/acidisland/AcidIsland.java @@ -4,7 +4,6 @@ import org.bukkit.World; import org.bukkit.WorldCreator; import org.bukkit.WorldType; import org.bukkit.generator.ChunkGenerator; -import org.bukkit.plugin.PluginManager; import org.eclipse.jdt.annotation.NonNull; import world.bentobox.acidisland.commands.AcidCommand; @@ -33,6 +32,16 @@ public class AcidIsland extends GameModeAddon { @Override public void onLoad() { + // Save the default config from config.yml + saveDefaultConfig(); + // Load settings from config.yml. This will check if there are any issues with it too. + loadSettings(); + // Chunk generator + chunkGenerator = settings.isUseOwnGenerator() ? null : new ChunkGeneratorWorld(this); + // Register commands + adminCommand = new AcidCommand(this, settings.getAdminCommand()); + playerCommand = new AiCommand(this, settings.getIslandCommand()); + saveDefaultConfig(); // Load settings loadSettings(); @@ -60,13 +69,9 @@ public class AcidIsland extends GameModeAddon { return; } // Register listeners - PluginManager manager = getServer().getPluginManager(); // Acid Effects - manager.registerEvents(new AcidEffect(this), this.getPlugin()); - manager.registerEvents(new LavaCheck(this), this.getPlugin()); - // Register commands - adminCommand = new AcidCommand(this, settings.getAdminCommand()); - playerCommand = new AiCommand(this, settings.getIslandCommand()); + registerListener(new AcidEffect(this)); + registerListener(new LavaCheck(this)); // Burn everything acidTask = new AcidTask(this); }