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:
@@ -22,9 +22,11 @@ object AutospawnHandler {
|
|||||||
val location = boss.autoSpawnLocations.randomOrNull() ?: continue
|
val location = boss.autoSpawnLocations.randomOrNull() ?: continue
|
||||||
val world = location.world ?: 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 }) {
|
if (Bosses.getAllAlive().mapNotNull { it.entity }.any { it.world == world }) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
val spawnEvent = BossSpawnEvent(boss, location, BossSpawnEvent.SpawnReason.AUTOSPAWN, null)
|
val spawnEvent = BossSpawnEvent(boss, location, BossSpawnEvent.SpawnReason.AUTOSPAWN, null)
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,9 @@
|
|||||||
discover-recipes: true
|
discover-recipes: true
|
||||||
log-spawn-kill: true
|
log-spawn-kill: true
|
||||||
|
|
||||||
|
autospawn:
|
||||||
|
one-boss-per-world: true # If only one boss can auto-spawn per world at once.
|
||||||
|
|
||||||
cooldown:
|
cooldown:
|
||||||
in-actionbar: true
|
in-actionbar: true
|
||||||
sound:
|
sound:
|
||||||
|
|||||||
Reference in New Issue
Block a user