diff --git a/src/main/java/world/bentobox/acidisland/AcidIsland.java b/src/main/java/world/bentobox/acidisland/AcidIsland.java index 6b87884..b58a1eb 100644 --- a/src/main/java/world/bentobox/acidisland/AcidIsland.java +++ b/src/main/java/world/bentobox/acidisland/AcidIsland.java @@ -7,6 +7,7 @@ import org.bukkit.World; import org.bukkit.World.Environment; import org.bukkit.WorldCreator; import org.bukkit.WorldType; +import org.bukkit.entity.SpawnCategory; import org.bukkit.generator.ChunkGenerator; import org.eclipse.jdt.annotation.NonNull; import org.eclipse.jdt.annotation.Nullable; @@ -147,22 +148,22 @@ public class AcidIsland extends GameModeAddon { // Set spawn rates if (w != null && getSettings() != null) { if (getSettings().getSpawnLimitMonsters() > 0) { - w.setMonsterSpawnLimit(getSettings().getSpawnLimitMonsters()); + w.setSpawnLimit(SpawnCategory.MONSTER, getSettings().getSpawnLimitMonsters()); } if (getSettings().getSpawnLimitAmbient() > 0) { - w.setAmbientSpawnLimit(getSettings().getSpawnLimitAmbient()); + w.setSpawnLimit(SpawnCategory.AMBIENT, getSettings().getSpawnLimitAmbient()); } if (getSettings().getSpawnLimitAnimals() > 0) { - w.setAnimalSpawnLimit(getSettings().getSpawnLimitAnimals()); + w.setSpawnLimit(SpawnCategory.ANIMAL, getSettings().getSpawnLimitAnimals()); } if (getSettings().getSpawnLimitWaterAnimals() > 0) { - w.setWaterAnimalSpawnLimit(getSettings().getSpawnLimitWaterAnimals()); + w.setSpawnLimit(SpawnCategory.WATER_ANIMAL, getSettings().getSpawnLimitWaterAnimals()); } if (getSettings().getTicksPerAnimalSpawns() > 0) { - w.setTicksPerAnimalSpawns(getSettings().getTicksPerAnimalSpawns()); + w.setTicksPerSpawns(SpawnCategory.ANIMAL, getSettings().getTicksPerAnimalSpawns()); } if (getSettings().getTicksPerMonsterSpawns() > 0) { - w.setTicksPerMonsterSpawns(getSettings().getTicksPerMonsterSpawns()); + w.setTicksPerSpawns(SpawnCategory.MONSTER, getSettings().getTicksPerMonsterSpawns()); } } return w;