diff --git a/pom.xml b/pom.xml index 241f0fe..ea680bb 100644 --- a/pom.xml +++ b/pom.xml @@ -1,61 +1,71 @@ - - 4.0.0 - us.tastybento - addon-acidisland - 0.0.1-SNAPSHOT - jar - - UTF-8 - - - clean package install - - - . - true - ${basedir} - - *.yml - - - - locales - false - ${basedir}/locales - - *.yml - - - + + 4.0.0 + us.tastybento + addon-acidisland + 0.0.1-SNAPSHOT + jar + + UTF-8 + + + clean package install + + + . + true + ${basedir} + + *.yml + + + + schems + false + ${basedir}/schems + + *.schem + + + + locales + false + ${basedir}/locales + + *.yml + + + - - - maven-compiler-plugin - 3.5.1 - - 1.8 - 1.8 - - - - - - - org.bukkit - bukkit - 1.12.2-R0.1-SNAPSHOT - provided - - - us.tastybento - bskyblock - LATEST - - - - - spigot-repo - https://hub.spigotmc.org/nexus/content/repositories/snapshots/ - - + + + maven-compiler-plugin + 3.5.1 + + 1.8 + 1.8 + + + + + + + org.bukkit + bukkit + 1.12.2-R0.1-SNAPSHOT + provided + + + us.tastybento + bskyblock + LATEST + + + + + spigot-repo + https://hub.spigotmc.org/nexus/content/repositories/snapshots/ + + \ No newline at end of file diff --git a/schems/end-island.schem b/schems/end-island.schem new file mode 100644 index 0000000..796334e Binary files /dev/null and b/schems/end-island.schem differ diff --git a/schems/island.schem b/schems/island.schem new file mode 100644 index 0000000..184ade4 Binary files /dev/null and b/schems/island.schem differ diff --git a/schems/nether-island.schem b/schems/nether-island.schem new file mode 100644 index 0000000..968824f Binary files /dev/null and b/schems/nether-island.schem differ diff --git a/src/main/java/bskyblock/addon/acidisland/AISettings.java b/src/main/java/bskyblock/addon/acidisland/AISettings.java index 4962d47..f4ab12b 100644 --- a/src/main/java/bskyblock/addon/acidisland/AISettings.java +++ b/src/main/java/bskyblock/addon/acidisland/AISettings.java @@ -6,6 +6,7 @@ import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.Set; import org.bukkit.GameMode; @@ -13,6 +14,7 @@ import org.bukkit.entity.EntityType; import org.bukkit.inventory.ItemStack; import org.bukkit.potion.PotionEffectType; +import us.tastybento.bskyblock.api.addons.Addon; import us.tastybento.bskyblock.api.configuration.ConfigComment; import us.tastybento.bskyblock.api.configuration.ConfigEntry; import us.tastybento.bskyblock.api.configuration.StoreAt; @@ -1453,4 +1455,9 @@ public class AISettings implements DataObject, WorldSettings { this.closePanelOnClickOutside = closePanelOnClickOutside; } + @Override + public Optional getAddon() { + return Optional.of(AcidIsland.getInstance()); + } + } diff --git a/src/main/java/bskyblock/addon/acidisland/AcidIsland.java b/src/main/java/bskyblock/addon/acidisland/AcidIsland.java index 873dd9c..6616942 100644 --- a/src/main/java/bskyblock/addon/acidisland/AcidIsland.java +++ b/src/main/java/bskyblock/addon/acidisland/AcidIsland.java @@ -6,7 +6,6 @@ import org.bukkit.plugin.PluginManager; import bskyblock.addon.acidisland.commands.AcidCommand; import bskyblock.addon.acidisland.commands.AiCommand; import bskyblock.addon.acidisland.listeners.AcidEffect; -import bskyblock.addon.acidisland.listeners.IslandBuilder; import bskyblock.addon.acidisland.listeners.LavaCheck; import bskyblock.addon.acidisland.world.AcidIslandWorld; import bskyblock.addon.acidisland.world.AcidTask; @@ -19,12 +18,14 @@ import us.tastybento.bskyblock.api.configuration.BSBConfig; * */ public class AcidIsland extends Addon { - + + private static AcidIsland addon; private AISettings settings; private AcidIslandWorld aiw; @Override public void onLoad() { + addon = this; saveDefaultConfig(); // Load settings settings = new BSBConfig<>(this, AISettings.class).loadConfigObject(""); @@ -40,7 +41,7 @@ public class AcidIsland extends Addon { manager.registerEvents(new AcidEffect(this), this.getBSkyBlock()); manager.registerEvents(new LavaCheck(this), this.getBSkyBlock()); // New Islands - manager.registerEvents(new IslandBuilder(this), this.getBSkyBlock()); + //manager.registerEvents(new IslandBuilder(this), this.getBSkyBlock()); // Register commands new AcidCommand(this); new AiCommand(this); @@ -62,7 +63,7 @@ public class AcidIsland extends Addon { public AcidIslandWorld getAiw() { return aiw; } - + /** * Convenience method to obtain the AcidIsland overworld * @return Island World @@ -71,10 +72,13 @@ public class AcidIsland extends Addon { return aiw.getOverWorld(); } + @Override public void log(String string) { - getBSkyBlock().log(string); + getBSkyBlock().log(string); } - + public static AcidIsland getInstance() { + return addon; + } } diff --git a/src/main/java/bskyblock/addon/acidisland/world/AcidIslandWorld.java b/src/main/java/bskyblock/addon/acidisland/world/AcidIslandWorld.java index 4145348..4b091b6 100644 --- a/src/main/java/bskyblock/addon/acidisland/world/AcidIslandWorld.java +++ b/src/main/java/bskyblock/addon/acidisland/world/AcidIslandWorld.java @@ -34,6 +34,7 @@ public class AcidIslandWorld { islandWorld = WorldCreator.name(worldName).type(WorldType.FLAT).environment(World.Environment.NORMAL).generator(new ChunkGeneratorWorld(addon)) .createWorld(); addon.getBSkyBlock().registerWorld(islandWorld, addon.getSettings()); + // Make the nether if it does not exist if (addon.getSettings().isNetherGenerate()) { if (addon.getServer().getWorld(worldName + NETHER) == null) { @@ -58,6 +59,10 @@ public class AcidIslandWorld { .environment(World.Environment.THE_END).createWorld(); } } + + // Load schematics + addon.getBSkyBlock().getSchemsManager().loadIslands(islandWorld); + }