diff --git a/src/main/java/net/knarcraft/minecraftserverlauncher/server/ServerHandler.java b/src/main/java/net/knarcraft/minecraftserverlauncher/server/ServerHandler.java index 4bf340c..87b61bf 100644 --- a/src/main/java/net/knarcraft/minecraftserverlauncher/server/ServerHandler.java +++ b/src/main/java/net/knarcraft/minecraftserverlauncher/server/ServerHandler.java @@ -60,10 +60,13 @@ public class ServerHandler { } stoppingServers = true; + int serversRunning = 0; + for (Collection collection : Main.getController().getCurrentProfile().getCollections()) { Server server = collection.getServer(); BufferedWriter writer = server.getWriter(); if (writer != null) { + serversRunning++; if (server.isProxy()) { writer.write("end\n"); } else { @@ -74,7 +77,10 @@ public class ServerHandler { server.setStopped(); } } - //TODO: Set stoppingServers to false if no servers are actually running + + if (serversRunning == 0) { + stoppingServers = false; + } } /**