mirror of
https://github.com/Auxilor/EcoMobs.git
synced 2025-12-21 16:09:24 +00:00
Added check for living bosses
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.willfp.ecobosses.bosses.listeners;
|
||||
|
||||
import com.willfp.eco.util.NumberUtils;
|
||||
import com.willfp.ecobosses.EcoBossesPlugin;
|
||||
import com.willfp.ecobosses.bosses.EcoBoss;
|
||||
import com.willfp.ecobosses.bosses.EcoBosses;
|
||||
import org.bukkit.Location;
|
||||
@@ -21,6 +22,10 @@ public class AutoSpawnTimer implements Runnable {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!boss.getLivingBosses().isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (tick % boss.getAutoSpawnInterval() == 0) {
|
||||
Location location = boss.getAutoSpawnLocations().get(NumberUtils.randInt(0, boss.getAutoSpawnLocations().size() - 1));
|
||||
boss.spawn(location);
|
||||
|
||||
Reference in New Issue
Block a user