diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/spawn/AutospawnHandler.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/spawn/AutospawnHandler.kt index 07acf03..c8fda22 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/spawn/AutospawnHandler.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/spawn/AutospawnHandler.kt @@ -22,8 +22,10 @@ object AutospawnHandler { val location = boss.autoSpawnLocations.randomOrNull() ?: continue val world = location.world ?: continue - if (Bosses.getAllAlive().mapNotNull { it.entity }.any { it.world == world }) { - continue + if (plugin.configYml.getBool("autospawn.one-boss-per-world")) { + if (Bosses.getAllAlive().mapNotNull { it.entity }.any { it.world == world }) { + continue + } } val spawnEvent = BossSpawnEvent(boss, location, BossSpawnEvent.SpawnReason.AUTOSPAWN, null) diff --git a/eco-core/core-plugin/src/main/resources/config.yml b/eco-core/core-plugin/src/main/resources/config.yml index 592082f..4a90e77 100644 --- a/eco-core/core-plugin/src/main/resources/config.yml +++ b/eco-core/core-plugin/src/main/resources/config.yml @@ -6,6 +6,9 @@ discover-recipes: true log-spawn-kill: true +autospawn: + one-boss-per-world: true # If only one boss can auto-spawn per world at once. + cooldown: in-actionbar: true sound: