9
0
mirror of https://github.com/Auxilor/EcoMobs.git synced 2025-12-20 23:49:22 +00:00

Added autospawn.one-boss-per-world option

This commit is contained in:
Auxilor
2022-04-08 18:03:39 +01:00
parent 31610383c4
commit 0d846d9dff
2 changed files with 7 additions and 2 deletions

View File

@@ -22,9 +22,11 @@ object AutospawnHandler {
val location = boss.autoSpawnLocations.randomOrNull() ?: continue
val world = location.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)

View File

@@ -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: