From 443a153024551171f431a9f18b41cb8a44d6574f Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Fri, 26 May 2023 23:01:10 -0600 Subject: force server build on existing server --- .../xyz/brysonsteck/ServerCraft/controllers/PrimaryController.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/main') diff --git a/src/main/kotlin/xyz/brysonsteck/ServerCraft/controllers/PrimaryController.kt b/src/main/kotlin/xyz/brysonsteck/ServerCraft/controllers/PrimaryController.kt index 2282d13..7ec04e9 100644 --- a/src/main/kotlin/xyz/brysonsteck/ServerCraft/controllers/PrimaryController.kt +++ b/src/main/kotlin/xyz/brysonsteck/ServerCraft/controllers/PrimaryController.kt @@ -521,6 +521,7 @@ class PrimaryController { } progressBar.isVisible = false + findServerJar() withContext(Dispatchers.JavaFx){ worldSettingsPane.isDisable = false directoryPane.isDisable = false @@ -764,9 +765,10 @@ class PrimaryController { val result = createDialog("warning", "This server directory was not created by \nServerCraft. Errors may occur; copying\nthe world directories to a new folder may be\nsafer. Proceed anyway?") statusBar.text = "Ready." if (result) { - startButton.isDisable = false + startButton.isDisable = true File(directory + "ServerCraft").mkdir() buildButton.text = "Build Server" + statusBar.text = "Server converted. Build the server to start." server.loadProps(dir, convert=true) } return result @@ -777,10 +779,10 @@ class PrimaryController { File(directory + "ServerCraft").mkdir() startButton.isDisable = true buildButton.text = "Build Server" + server.dir = dir + server.loadProps() } statusBar.text = "Ready." - server.dir = dir - server.loadProps() return result } -- cgit v1.2.3