From 3e7c69d7a230583d50d24849d799d112edc943ef Mon Sep 17 00:00:00 2001 From: Kristian Knarvik Date: Tue, 20 Feb 2018 21:09:58 +0100 Subject: [PATCH] Delay startup actually does something --- src/net/knarcraft/serverlauncher/server/Server.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/net/knarcraft/serverlauncher/server/Server.java b/src/net/knarcraft/serverlauncher/server/Server.java index fbedc83..a385668 100644 --- a/src/net/knarcraft/serverlauncher/server/Server.java +++ b/src/net/knarcraft/serverlauncher/server/Server.java @@ -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")) {