9
0
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:
hayanesuru
2025-06-11 12:48:38 +09:00
parent d2dc5a0895
commit ab24c46fb5
2 changed files with 2 additions and 2 deletions

View File

@@ -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) {

View File

@@ -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);