mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-24 01:19:25 +00:00
remove shutdown log if mob spawning disabled
This commit is contained in:
@@ -13,7 +13,7 @@ public class AsyncExecutor implements Runnable {
|
||||
|
||||
private final Logger LOGGER = LogManager.getLogger("Leaf");
|
||||
private final PriorityQueue<Runnable> jobs = PriorityQueues.synchronize(new ObjectArrayFIFOQueue<>());
|
||||
private final Thread thread;
|
||||
public final Thread thread;
|
||||
private volatile boolean killswitch = false;
|
||||
|
||||
public AsyncExecutor(String threadName) {
|
||||
|
||||
@@ -14,7 +14,7 @@ public class ShutdownExecutors {
|
||||
public static final Logger LOGGER = LogManager.getLogger("Leaf");
|
||||
|
||||
public static void shutdown(MinecraftServer server) {
|
||||
if (server.mobSpawnExecutor != null) {
|
||||
if (server.mobSpawnExecutor != null && server.mobSpawnExecutor.thread.isAlive()) {
|
||||
LOGGER.info("Waiting for mob spawning thread to shutdown...");
|
||||
try {
|
||||
server.mobSpawnExecutor.join(3000L);
|
||||
|
||||
Reference in New Issue
Block a user