mirror of
https://github.com/BentoBoxWorld/AcidIsland.git
synced 2024-11-23 02:55:21 +01:00
Uses new GameModeAddon API 1.1.1
This commit is contained in:
parent
8ca438640f
commit
12470e5cfb
4
pom.xml
4
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>world.bentobox</groupId>
|
||||
<artifactId>acidisland</artifactId>
|
||||
<version>1.1-SNAPSHOT</version>
|
||||
<version>1.1.1-SNAPSHOT</version>
|
||||
|
||||
<name>AcidIsland</name>
|
||||
<description>AcidIsland is an add-on for BentoBox, an expandable Minecraft Bukkit plugin for island-type games like SkyBlock or AcidIsland.</description>
|
||||
@ -91,7 +91,7 @@
|
||||
<dependency>
|
||||
<groupId>world.bentobox</groupId>
|
||||
<artifactId>bentobox</artifactId>
|
||||
<version>1.1-SNAPSHOT</version>
|
||||
<version>1.1.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -3,7 +3,9 @@ package world.bentobox.acidisland;
|
||||
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;
|
||||
import world.bentobox.acidisland.commands.AiCommand;
|
||||
@ -24,6 +26,7 @@ public class AcidIsland extends GameModeAddon {
|
||||
|
||||
private AISettings settings;
|
||||
private AcidTask acidTask;
|
||||
private @NonNull ChunkGenerator chunkGenerator;
|
||||
|
||||
private static final String NETHER = "_nether";
|
||||
private static final String THE_END = "_the_end";
|
||||
@ -94,7 +97,8 @@ public class AcidIsland extends GameModeAddon {
|
||||
getLogger().info("Creating AcidIsland...");
|
||||
}
|
||||
// Create the world if it does not exist
|
||||
islandWorld = WorldCreator.name(worldName).type(WorldType.FLAT).environment(World.Environment.NORMAL).generator(new ChunkGeneratorWorld(this))
|
||||
chunkGenerator = new ChunkGeneratorWorld(this);
|
||||
islandWorld = WorldCreator.name(worldName).type(WorldType.FLAT).environment(World.Environment.NORMAL).generator(chunkGenerator)
|
||||
.createWorld();
|
||||
|
||||
// Make the nether if it does not exist
|
||||
@ -105,7 +109,7 @@ public class AcidIsland extends GameModeAddon {
|
||||
if (!settings.isNetherIslands()) {
|
||||
netherWorld = WorldCreator.name(worldName + NETHER).type(WorldType.NORMAL).environment(World.Environment.NETHER).createWorld();
|
||||
} else {
|
||||
netherWorld = WorldCreator.name(worldName + NETHER).type(WorldType.FLAT).generator(new ChunkGeneratorWorld(this))
|
||||
netherWorld = WorldCreator.name(worldName + NETHER).type(WorldType.FLAT).generator(chunkGenerator)
|
||||
.environment(World.Environment.NETHER).createWorld();
|
||||
}
|
||||
}
|
||||
@ -117,7 +121,7 @@ public class AcidIsland extends GameModeAddon {
|
||||
if (!settings.isEndIslands()) {
|
||||
endWorld = WorldCreator.name(worldName + THE_END).type(WorldType.NORMAL).environment(World.Environment.THE_END).createWorld();
|
||||
} else {
|
||||
endWorld = WorldCreator.name(worldName + THE_END).type(WorldType.FLAT).generator(new ChunkGeneratorWorld(this))
|
||||
endWorld = WorldCreator.name(worldName + THE_END).type(WorldType.FLAT).generator(chunkGenerator)
|
||||
.environment(World.Environment.THE_END).createWorld();
|
||||
}
|
||||
}
|
||||
@ -135,4 +139,9 @@ public class AcidIsland extends GameModeAddon {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull ChunkGenerator getDefaultWorldGenerator(String worldName, String id) {
|
||||
return chunkGenerator;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user