Delay startup actually does something

This commit is contained in:
Kristian Knarvik 2018-02-20 21:09:58 +01:00
parent 16edbfd44c
commit 3e7c69d7a2

View File

@ -6,6 +6,7 @@ import net.knarcraft.serverlauncher.profile.Profile;
import java.io.*;
import java.nio.file.*;
import java.util.ArrayList;
import java.util.concurrent.TimeUnit;
import static net.knarcraft.serverlauncher.Shared.downloadFile;
import static net.knarcraft.serverlauncher.Shared.readFile;
@ -259,6 +260,12 @@ public class Server {
return false;
}
}
try {
Profile.getGUI().setStatus("Delaying startup");
TimeUnit.SECONDS.sleep(Profile.getCurrent().getDelayStartup());
} catch (InterruptedException e) {
e.printStackTrace();
}
try {
ProcessBuilder builder;
if (Profile.getCurrent().getDownloadJars() && !type.getName().equals("Custom")) {