Improves checking for whether a server should be delayed before starting
All checks were successful
KnarCraft/Minecraft-Server-Launcher/pipeline/head This commit looks good
All checks were successful
KnarCraft/Minecraft-Server-Launcher/pipeline/head This commit looks good
This commit is contained in:
@ -117,9 +117,11 @@ public class ServerHandler {
|
||||
public static void startServers() {
|
||||
ServerLauncherController controller = Main.getController();
|
||||
gui.setStatus("Starting servers");
|
||||
int serverNum = 0;
|
||||
Server previouslyStartedServer = null;
|
||||
|
||||
for (Collection collection : controller.getCurrentProfile().getCollections()) {
|
||||
if (!collection.getServer().runServer(serverNum++ == 0)) {
|
||||
Server server = collection.getServer();
|
||||
if (!server.runServer(previouslyStartedServer == null || previouslyStartedServer.isProxy())) {
|
||||
gui.showError("An error occurred. Start aborted. Please check relevant log files.");
|
||||
try {
|
||||
stop();
|
||||
@ -129,6 +131,9 @@ public class ServerHandler {
|
||||
gui.updateGUIElementsWhenServersStartOrStop(false);
|
||||
return;
|
||||
}
|
||||
if (server.isEnabled()) {
|
||||
previouslyStartedServer = server;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user