From 13c4c1cfc0f2ddcf53a9b2e4a1a516b795adb4f6 Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Sun, 14 May 2023 13:44:35 -0600 Subject: [PATCH] complete rename to ServerCraft --- app/build.gradle | 2 +- .../{serverfordummies => servercraft}/App.kt | 4 +-- .../xyz/brysonsteck/servercraft/Main.kt | 5 ++++ .../controllers/InfoController.kt | 2 +- .../controllers/PrimaryController.kt | 26 +++++++++--------- .../server/Download.kt | 2 +- .../server/Server.kt | 2 +- .../xyz/brysonsteck/serverfordummies/Main.kt | 5 ---- .../{serverfordummies => servercraft}/app.png | Bin .../css/info-tabs.css | 0 .../icons/info.png | Bin .../icons/warning.png | Bin .../info.fxml | 2 +- .../primary.fxml | 2 +- .../brysonsteck/serverfordummies/AppTest.kt | 2 +- settings.gradle | 2 +- 16 files changed, 28 insertions(+), 28 deletions(-) rename app/src/main/kotlin/xyz/brysonsteck/{serverfordummies => servercraft}/App.kt (90%) create mode 100644 app/src/main/kotlin/xyz/brysonsteck/servercraft/Main.kt rename app/src/main/kotlin/xyz/brysonsteck/{serverfordummies => servercraft}/controllers/InfoController.kt (97%) rename app/src/main/kotlin/xyz/brysonsteck/{serverfordummies => servercraft}/controllers/PrimaryController.kt (94%) rename app/src/main/kotlin/xyz/brysonsteck/{serverfordummies => servercraft}/server/Download.kt (98%) rename app/src/main/kotlin/xyz/brysonsteck/{serverfordummies => servercraft}/server/Server.kt (96%) delete mode 100644 app/src/main/kotlin/xyz/brysonsteck/serverfordummies/Main.kt rename app/src/main/resources/xyz/brysonsteck/{serverfordummies => servercraft}/app.png (100%) rename app/src/main/resources/xyz/brysonsteck/{serverfordummies => servercraft}/css/info-tabs.css (100%) rename app/src/main/resources/xyz/brysonsteck/{serverfordummies => servercraft}/icons/info.png (100%) rename app/src/main/resources/xyz/brysonsteck/{serverfordummies => servercraft}/icons/warning.png (100%) rename app/src/main/resources/xyz/brysonsteck/{serverfordummies => servercraft}/info.fxml (98%) rename app/src/main/resources/xyz/brysonsteck/{serverfordummies => servercraft}/primary.fxml (99%) diff --git a/app/build.gradle b/app/build.gradle index 340cf3e..114001f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -42,7 +42,7 @@ dependencies { application { // Define the main class for the application. - mainClass = 'xyz.brysonsteck.serverfordummies.MainKt' + mainClass = 'xyz.brysonsteck.servercraft.MainKt' } jar { diff --git a/app/src/main/kotlin/xyz/brysonsteck/serverfordummies/App.kt b/app/src/main/kotlin/xyz/brysonsteck/servercraft/App.kt similarity index 90% rename from app/src/main/kotlin/xyz/brysonsteck/serverfordummies/App.kt rename to app/src/main/kotlin/xyz/brysonsteck/servercraft/App.kt index 3ff7c46..7aa5639 100644 --- a/app/src/main/kotlin/xyz/brysonsteck/serverfordummies/App.kt +++ b/app/src/main/kotlin/xyz/brysonsteck/servercraft/App.kt @@ -1,7 +1,7 @@ /* * This Kotlin source file was generated by the Gradle 'init' task. */ -package xyz.brysonsteck.serverfordummies +package xyz.brysonsteck.servercraft import javafx.application.Application; import javafx.fxml.FXMLLoader; @@ -17,7 +17,7 @@ class App : Application() { var scene = Scene(loadFXML("primary"), 963.0, 713.0) stage.icons.add(Image(this.javaClass.getResourceAsStream("app.png"))) stage.setResizable(false) - stage.title = "Server For Dummies" + stage.title = "ServerCraft" stage.scene = scene stage.show() } diff --git a/app/src/main/kotlin/xyz/brysonsteck/servercraft/Main.kt b/app/src/main/kotlin/xyz/brysonsteck/servercraft/Main.kt new file mode 100644 index 0000000..e914e99 --- /dev/null +++ b/app/src/main/kotlin/xyz/brysonsteck/servercraft/Main.kt @@ -0,0 +1,5 @@ +package xyz.brysonsteck.servercraft + +fun main() { + App().run() +} \ No newline at end of file diff --git a/app/src/main/kotlin/xyz/brysonsteck/serverfordummies/controllers/InfoController.kt b/app/src/main/kotlin/xyz/brysonsteck/servercraft/controllers/InfoController.kt similarity index 97% rename from app/src/main/kotlin/xyz/brysonsteck/serverfordummies/controllers/InfoController.kt rename to app/src/main/kotlin/xyz/brysonsteck/servercraft/controllers/InfoController.kt index a0b7915..a4bdb18 100644 --- a/app/src/main/kotlin/xyz/brysonsteck/serverfordummies/controllers/InfoController.kt +++ b/app/src/main/kotlin/xyz/brysonsteck/servercraft/controllers/InfoController.kt @@ -1,4 +1,4 @@ -package xyz.brysonsteck.serverfordummies.controllers +package xyz.brysonsteck.servercraft.controllers import javafx.fxml.FXML import javafx.application.Platform diff --git a/app/src/main/kotlin/xyz/brysonsteck/serverfordummies/controllers/PrimaryController.kt b/app/src/main/kotlin/xyz/brysonsteck/servercraft/controllers/PrimaryController.kt similarity index 94% rename from app/src/main/kotlin/xyz/brysonsteck/serverfordummies/controllers/PrimaryController.kt rename to app/src/main/kotlin/xyz/brysonsteck/servercraft/controllers/PrimaryController.kt index 81a860e..dd795e2 100644 --- a/app/src/main/kotlin/xyz/brysonsteck/serverfordummies/controllers/PrimaryController.kt +++ b/app/src/main/kotlin/xyz/brysonsteck/servercraft/controllers/PrimaryController.kt @@ -1,4 +1,4 @@ -package xyz.brysonsteck.serverfordummies.controllers +package xyz.brysonsteck.servercraft.controllers import kotlinx.coroutines.* import kotlinx.coroutines.javafx.JavaFx @@ -52,9 +52,9 @@ import javafx.stage.Stage import javafx.event.EventHandler import org.rauschig.jarchivelib.* -import xyz.brysonsteck.serverfordummies.server.Server -import xyz.brysonsteck.serverfordummies.server.Download -import xyz.brysonsteck.serverfordummies.App +import xyz.brysonsteck.servercraft.server.Server +import xyz.brysonsteck.servercraft.server.Download +import xyz.brysonsteck.servercraft.App class PrimaryController { @FXML @@ -265,8 +265,8 @@ class PrimaryController { "BuildTools" to "https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar", ) val destinations = mapOf ( - "Java 20" to directory + "ServerForDummies" + File.separator + "Java" + File.separator, - "BuildTools" to directory + "ServerForDummies" + File.separator + "Spigot" + File.separator + "Java 20" to directory + "ServerCraft" + File.separator + "Java" + File.separator, + "BuildTools" to directory + "ServerCraft" + File.separator + "Spigot" + File.separator ) val spigotBuilt = File(destinations["BuildTools"]).exists() val javaExtracted = File(destinations["Java 20"] + "jdk-20.0.1").exists() @@ -301,13 +301,13 @@ class PrimaryController { progressBar.progress = ProgressBar.INDETERMINATE_PROGRESS statusBar.text = "Extracting Java archive..." } - var stream = archiver.stream(File(directory + "ServerForDummies" + File.separator + "Java" + File.separator + javaFile)) - val dest = File(directory + "ServerForDummies" + File.separator + "Java") + var stream = archiver.stream(File(directory + "ServerCraft" + File.separator + "Java" + File.separator + javaFile)) + val dest = File(directory + "ServerCraft" + File.separator + "Java") var entries = 0.0 while(stream.getNextEntry() != null && building) { entries++ } - stream = archiver.stream(File(directory + "ServerForDummies" + File.separator + "Java" + File.separator + javaFile)) + stream = archiver.stream(File(directory + "ServerCraft" + File.separator + "Java" + File.separator + javaFile)) var entry = stream.getNextEntry() var currentEntry = 0.0 do { @@ -324,7 +324,7 @@ class PrimaryController { statusBar.text = "Building Minecraft Server..." } val builder = ProcessBuilder("java", "-jar", "BuildTools.jar", "--rev", "latest", "-o", ".." + File.separator + ".." + File.separator) - builder.directory(File(directory + "ServerForDummies" + File.separator + "Spigot")) + builder.directory(File(directory + "ServerCraft" + File.separator + "Spigot")) val proc = builder.start() val reader = InputStreamReader(proc.inputStream) val br = BufferedReader(reader) @@ -566,7 +566,7 @@ class PrimaryController { if (directory[directory.length-1] != File.separatorChar) directory += File.separatorChar - val hasDummy = File(directory + "ServerForDummies").isDirectory + val hasDummy = File(directory + "ServerCraft").isDirectory val hasProperties = File(directory + File.separator + "server.properties").isFile val hasServer = findServerJar() @@ -581,7 +581,7 @@ class PrimaryController { statusBar.text = "Server needs to be built before starting." } else if (!hasDummy && hasServer) { // server created externally - val result = createDialog("warning", "This server directory was not created by \nServerForDummies. Errors may occur; copying\nthe world directories to a new folder may be\nsafer. Proceed anyway?", "Yes", "No", true) + 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?", "Yes", "No", true) statusBar.text = "Ready." if (result) { startButton.isDisable = false @@ -591,7 +591,7 @@ class PrimaryController { // assume clean directory val result = createDialog("info", "There is no server in this directory.\nCreate one?", "Yes", "No", true) if (result) { - File(directory + "ServerForDummies").mkdir() + File(directory + "ServerCraft").mkdir() startButton.isDisable = true buildButton.text = "Build Server" } diff --git a/app/src/main/kotlin/xyz/brysonsteck/serverfordummies/server/Download.kt b/app/src/main/kotlin/xyz/brysonsteck/servercraft/server/Download.kt similarity index 98% rename from app/src/main/kotlin/xyz/brysonsteck/serverfordummies/server/Download.kt rename to app/src/main/kotlin/xyz/brysonsteck/servercraft/server/Download.kt index d7e5aed..a10ff69 100644 --- a/app/src/main/kotlin/xyz/brysonsteck/serverfordummies/server/Download.kt +++ b/app/src/main/kotlin/xyz/brysonsteck/servercraft/server/Download.kt @@ -1,4 +1,4 @@ -package xyz.brysonsteck.serverfordummies.server +package xyz.brysonsteck.servercraft.server import java.io.*; import java.net.*; diff --git a/app/src/main/kotlin/xyz/brysonsteck/serverfordummies/server/Server.kt b/app/src/main/kotlin/xyz/brysonsteck/servercraft/server/Server.kt similarity index 96% rename from app/src/main/kotlin/xyz/brysonsteck/serverfordummies/server/Server.kt rename to app/src/main/kotlin/xyz/brysonsteck/servercraft/server/Server.kt index 3aae89a..38e79a1 100644 --- a/app/src/main/kotlin/xyz/brysonsteck/serverfordummies/server/Server.kt +++ b/app/src/main/kotlin/xyz/brysonsteck/servercraft/server/Server.kt @@ -1,4 +1,4 @@ -package xyz.brysonsteck.serverfordummies.server +package xyz.brysonsteck.servercraft.server import java.io.File import java.util.Properties diff --git a/app/src/main/kotlin/xyz/brysonsteck/serverfordummies/Main.kt b/app/src/main/kotlin/xyz/brysonsteck/serverfordummies/Main.kt deleted file mode 100644 index 604825f..0000000 --- a/app/src/main/kotlin/xyz/brysonsteck/serverfordummies/Main.kt +++ /dev/null @@ -1,5 +0,0 @@ -package xyz.brysonsteck.serverfordummies - -fun main() { - App().run() -} \ No newline at end of file diff --git a/app/src/main/resources/xyz/brysonsteck/serverfordummies/app.png b/app/src/main/resources/xyz/brysonsteck/servercraft/app.png similarity index 100% rename from app/src/main/resources/xyz/brysonsteck/serverfordummies/app.png rename to app/src/main/resources/xyz/brysonsteck/servercraft/app.png diff --git a/app/src/main/resources/xyz/brysonsteck/serverfordummies/css/info-tabs.css b/app/src/main/resources/xyz/brysonsteck/servercraft/css/info-tabs.css similarity index 100% rename from app/src/main/resources/xyz/brysonsteck/serverfordummies/css/info-tabs.css rename to app/src/main/resources/xyz/brysonsteck/servercraft/css/info-tabs.css diff --git a/app/src/main/resources/xyz/brysonsteck/serverfordummies/icons/info.png b/app/src/main/resources/xyz/brysonsteck/servercraft/icons/info.png similarity index 100% rename from app/src/main/resources/xyz/brysonsteck/serverfordummies/icons/info.png rename to app/src/main/resources/xyz/brysonsteck/servercraft/icons/info.png diff --git a/app/src/main/resources/xyz/brysonsteck/serverfordummies/icons/warning.png b/app/src/main/resources/xyz/brysonsteck/servercraft/icons/warning.png similarity index 100% rename from app/src/main/resources/xyz/brysonsteck/serverfordummies/icons/warning.png rename to app/src/main/resources/xyz/brysonsteck/servercraft/icons/warning.png diff --git a/app/src/main/resources/xyz/brysonsteck/serverfordummies/info.fxml b/app/src/main/resources/xyz/brysonsteck/servercraft/info.fxml similarity index 98% rename from app/src/main/resources/xyz/brysonsteck/serverfordummies/info.fxml rename to app/src/main/resources/xyz/brysonsteck/servercraft/info.fxml index 1457d46..9228a2b 100644 --- a/app/src/main/resources/xyz/brysonsteck/serverfordummies/info.fxml +++ b/app/src/main/resources/xyz/brysonsteck/servercraft/info.fxml @@ -15,7 +15,7 @@ - + diff --git a/app/src/main/resources/xyz/brysonsteck/serverfordummies/primary.fxml b/app/src/main/resources/xyz/brysonsteck/servercraft/primary.fxml similarity index 99% rename from app/src/main/resources/xyz/brysonsteck/serverfordummies/primary.fxml rename to app/src/main/resources/xyz/brysonsteck/servercraft/primary.fxml index 2cedc4f..dfdadd7 100644 --- a/app/src/main/resources/xyz/brysonsteck/serverfordummies/primary.fxml +++ b/app/src/main/resources/xyz/brysonsteck/servercraft/primary.fxml @@ -20,7 +20,7 @@ - + diff --git a/app/src/test/kotlin/xyz/brysonsteck/serverfordummies/AppTest.kt b/app/src/test/kotlin/xyz/brysonsteck/serverfordummies/AppTest.kt index e1d1866..0376e26 100644 --- a/app/src/test/kotlin/xyz/brysonsteck/serverfordummies/AppTest.kt +++ b/app/src/test/kotlin/xyz/brysonsteck/serverfordummies/AppTest.kt @@ -1,7 +1,7 @@ /* * This Kotlin source file was generated by the Gradle 'init' task. */ -package xyz.brysonsteck.serverfordummies +package xyz.brysonsteck.servercraft import kotlin.test.Test import kotlin.test.assertNotNull diff --git a/settings.gradle b/settings.gradle index 740c6af..2d69564 100644 --- a/settings.gradle +++ b/settings.gradle @@ -7,5 +7,5 @@ * in the user manual at https://docs.gradle.org/8.0.2/userguide/multi_project_builds.html */ -rootProject.name = 'serverfordummies' +rootProject.name = 'servercraft' include('app')