mirror of
https://github.com/Auxilor/EcoMobs.git
synced 2025-12-21 07:59:28 +00:00
Added autospawn.one-boss-per-world option
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user