mirror of
https://github.com/BentoBoxWorld/AcidIsland.git
synced 2024-11-25 20:25:37 +01:00
Updated to use schems.
This commit is contained in:
parent
e47fb98cdc
commit
19bd6a0e6a
12
pom.xml
12
pom.xml
@ -1,4 +1,6 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>us.tastybento</groupId>
|
<groupId>us.tastybento</groupId>
|
||||||
<artifactId>addon-acidisland</artifactId>
|
<artifactId>addon-acidisland</artifactId>
|
||||||
@ -18,6 +20,14 @@
|
|||||||
<include>*.yml</include>
|
<include>*.yml</include>
|
||||||
</includes>
|
</includes>
|
||||||
</resource>
|
</resource>
|
||||||
|
<resource>
|
||||||
|
<targetPath>schems</targetPath>
|
||||||
|
<filtering>false</filtering>
|
||||||
|
<directory>${basedir}/schems</directory>
|
||||||
|
<includes>
|
||||||
|
<include>*.schem</include>
|
||||||
|
</includes>
|
||||||
|
</resource>
|
||||||
<resource>
|
<resource>
|
||||||
<targetPath>locales</targetPath>
|
<targetPath>locales</targetPath>
|
||||||
<filtering>false</filtering>
|
<filtering>false</filtering>
|
||||||
|
BIN
schems/end-island.schem
Normal file
BIN
schems/end-island.schem
Normal file
Binary file not shown.
BIN
schems/island.schem
Normal file
BIN
schems/island.schem
Normal file
Binary file not shown.
BIN
schems/nether-island.schem
Normal file
BIN
schems/nether-island.schem
Normal file
Binary file not shown.
@ -6,6 +6,7 @@ import java.util.HashMap;
|
|||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
@ -13,6 +14,7 @@ import org.bukkit.entity.EntityType;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.potion.PotionEffectType;
|
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.ConfigComment;
|
||||||
import us.tastybento.bskyblock.api.configuration.ConfigEntry;
|
import us.tastybento.bskyblock.api.configuration.ConfigEntry;
|
||||||
import us.tastybento.bskyblock.api.configuration.StoreAt;
|
import us.tastybento.bskyblock.api.configuration.StoreAt;
|
||||||
@ -1453,4 +1455,9 @@ public class AISettings implements DataObject, WorldSettings {
|
|||||||
this.closePanelOnClickOutside = closePanelOnClickOutside;
|
this.closePanelOnClickOutside = closePanelOnClickOutside;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Optional<Addon> getAddon() {
|
||||||
|
return Optional.of(AcidIsland.getInstance());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,6 @@ import org.bukkit.plugin.PluginManager;
|
|||||||
import bskyblock.addon.acidisland.commands.AcidCommand;
|
import bskyblock.addon.acidisland.commands.AcidCommand;
|
||||||
import bskyblock.addon.acidisland.commands.AiCommand;
|
import bskyblock.addon.acidisland.commands.AiCommand;
|
||||||
import bskyblock.addon.acidisland.listeners.AcidEffect;
|
import bskyblock.addon.acidisland.listeners.AcidEffect;
|
||||||
import bskyblock.addon.acidisland.listeners.IslandBuilder;
|
|
||||||
import bskyblock.addon.acidisland.listeners.LavaCheck;
|
import bskyblock.addon.acidisland.listeners.LavaCheck;
|
||||||
import bskyblock.addon.acidisland.world.AcidIslandWorld;
|
import bskyblock.addon.acidisland.world.AcidIslandWorld;
|
||||||
import bskyblock.addon.acidisland.world.AcidTask;
|
import bskyblock.addon.acidisland.world.AcidTask;
|
||||||
@ -20,11 +19,13 @@ import us.tastybento.bskyblock.api.configuration.BSBConfig;
|
|||||||
*/
|
*/
|
||||||
public class AcidIsland extends Addon {
|
public class AcidIsland extends Addon {
|
||||||
|
|
||||||
|
private static AcidIsland addon;
|
||||||
private AISettings settings;
|
private AISettings settings;
|
||||||
private AcidIslandWorld aiw;
|
private AcidIslandWorld aiw;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLoad() {
|
public void onLoad() {
|
||||||
|
addon = this;
|
||||||
saveDefaultConfig();
|
saveDefaultConfig();
|
||||||
// Load settings
|
// Load settings
|
||||||
settings = new BSBConfig<>(this, AISettings.class).loadConfigObject("");
|
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 AcidEffect(this), this.getBSkyBlock());
|
||||||
manager.registerEvents(new LavaCheck(this), this.getBSkyBlock());
|
manager.registerEvents(new LavaCheck(this), this.getBSkyBlock());
|
||||||
// New Islands
|
// New Islands
|
||||||
manager.registerEvents(new IslandBuilder(this), this.getBSkyBlock());
|
//manager.registerEvents(new IslandBuilder(this), this.getBSkyBlock());
|
||||||
// Register commands
|
// Register commands
|
||||||
new AcidCommand(this);
|
new AcidCommand(this);
|
||||||
new AiCommand(this);
|
new AiCommand(this);
|
||||||
@ -71,10 +72,13 @@ public class AcidIsland extends Addon {
|
|||||||
return aiw.getOverWorld();
|
return aiw.getOverWorld();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void log(String string) {
|
public void log(String string) {
|
||||||
getBSkyBlock().log(string);
|
getBSkyBlock().log(string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static AcidIsland getInstance() {
|
||||||
|
return addon;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,7 @@ public class AcidIslandWorld {
|
|||||||
islandWorld = WorldCreator.name(worldName).type(WorldType.FLAT).environment(World.Environment.NORMAL).generator(new ChunkGeneratorWorld(addon))
|
islandWorld = WorldCreator.name(worldName).type(WorldType.FLAT).environment(World.Environment.NORMAL).generator(new ChunkGeneratorWorld(addon))
|
||||||
.createWorld();
|
.createWorld();
|
||||||
addon.getBSkyBlock().registerWorld(islandWorld, addon.getSettings());
|
addon.getBSkyBlock().registerWorld(islandWorld, addon.getSettings());
|
||||||
|
|
||||||
// Make the nether if it does not exist
|
// Make the nether if it does not exist
|
||||||
if (addon.getSettings().isNetherGenerate()) {
|
if (addon.getSettings().isNetherGenerate()) {
|
||||||
if (addon.getServer().getWorld(worldName + NETHER) == null) {
|
if (addon.getServer().getWorld(worldName + NETHER) == null) {
|
||||||
@ -58,6 +59,10 @@ public class AcidIslandWorld {
|
|||||||
.environment(World.Environment.THE_END).createWorld();
|
.environment(World.Environment.THE_END).createWorld();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Load schematics
|
||||||
|
addon.getBSkyBlock().getSchemsManager().loadIslands(islandWorld);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user