diff --git a/HELP.md b/HELP.md index 120b18ca4..c67dbe18d 100644 --- a/HELP.md +++ b/HELP.md @@ -97,13 +97,11 @@ The following placeholders will be replaced by ServerPackCreator during the crea | SPC_MINECRAFT_VERSION_SPC | The Minecraft version of the modpack from which the server pack is created. | | SPC_MODLOADER_SPC | The modloader of the modpack from which the server pack is created. | | SPC_MODLOADER_VERSION_SPC | The modloader version of the modpack from which the server pack is created. | -| SPC_MINECRAFT_SERVER_URL_SPC | The download URL corresponding to the Minecraft version of the modpack from which the server pack is created. | | SPC_JAVA_ARGS_SPC | Java JVM args which are to be used when running the server pack. | | SPC_JAVA_SPC | `java` by default. Start scripts in ZIP-archives will always receive `java` as the value. You may change the value in the table provided in the GUI if you need a different Java path for local testing and debugging. Scripts in the unzipped server pack will have the custom value avaiable. | | SPC_FABRIC_INSTALLER_VERSION_SPC | The latest release version of the Fabric installer during creation. | | SPC_QUILT_INSTALLER_VERSION_SPC | The latest release version of the Quilt installer during creation. | | SPC_LEGACYFABRIC_INSTALLER_VERSION_SPC | The latest release version of the LegacyFabric installer during creation. | -| SPC_NEOFORGE_INSTALLER_URL_SPC | The URL to the NeoForge installer for the given Minecraft & NeoForge version, supplied during creation. | | SPC_RECOMMENDED_JAVA_VERSION_SPC | The recommended Java version to use with the modded server, as stated by Mojang themselves. | | SPC_WAIT_FOR_USER_INPUT_SPC | true/false allows you to enable/disable user confirmation upon graceful script ending. | | SPC_ADDITIONAL_ARGS_SPC | Additional arguments to supply to the JVM when starting the server. `-Dlog4j2.formatMsgNoLookups=true` by default. | @@ -130,8 +128,6 @@ The contents of the variables are as follows. See `### Default values` above for | LEGACYFABRIC_INSTALLER_VERSION | SPC_LEGACYFABRIC_INSTALLER_VERSION_SPC | | FABRIC_INSTALLER_VERSION | SPC_FABRIC_INSTALLER_VERSION_SPC | | QUILT_INSTALLER_VERSION | SPC_QUILT_INSTALLER_VERSION_SPC | -| NEOFORGE_INSTALLER_URL | SPC_NEOFORGE_INSTALLER_URL_SPC | -| MINECRAFT_SERVER_URL | SPC_MINECRAFT_SERVER_URL_SPC | | RECOMMENDED_JAVA_VERSION | SPC_RECOMMENDED_JAVA_VERSION_SPC | | JAVA_ARGS | "SPC_JAVA_ARGS_SPC" | | JAVA | "SPC_JAVA_SPC" | diff --git a/serverpackcreator-api/src/main/kotlin/de/griefed/serverpackcreator/api/config/ConfigurationHandler.kt b/serverpackcreator-api/src/main/kotlin/de/griefed/serverpackcreator/api/config/ConfigurationHandler.kt index f820ba522..dd451c6a2 100644 --- a/serverpackcreator-api/src/main/kotlin/de/griefed/serverpackcreator/api/config/ConfigurationHandler.kt +++ b/serverpackcreator-api/src/main/kotlin/de/griefed/serverpackcreator/api/config/ConfigurationHandler.kt @@ -585,7 +585,6 @@ class ConfigurationHandler( * * 1. `SPC_SERVERPACKCREATOR_VERSION_SPC` : `ServerPackCreator version with which the scripts were created` * 1. `SPC_MINECRAFT_VERSION_SPC` : `Minecraft version of the modpack` - * 1. `SPC_MINECRAFT_SERVER_URL_SPC` : `Download-URL to the Minecraft server ` * * 1. `SPC_MODLOADER_SPC` : `The modloader of the modpack` * 1. `SPC_MODLOADER_VERSION_SPC` : `The modloader version of the modpack @@ -613,10 +612,8 @@ class ConfigurationHandler( packConfig.scriptSettings["SPC_LEGACYFABRIC_INSTALLER_VERSION_SPC"] = versionMeta.legacyFabric.releaseInstaller() if (server.isEmpty || server.get().url().isEmpty) { - packConfig.scriptSettings["SPC_MINECRAFT_SERVER_URL_SPC"] = "" packConfig.scriptSettings["SPC_RECOMMENDED_JAVA_VERSION_SPC"] = "" } else { - packConfig.scriptSettings["SPC_MINECRAFT_SERVER_URL_SPC"] = server.get().url().get().toString() if (server.get().javaVersion().isPresent) { packConfig.scriptSettings["SPC_RECOMMENDED_JAVA_VERSION_SPC"] = server.get().javaVersion().get().toString() } else { diff --git a/serverpackcreator-api/src/main/kotlin/de/griefed/serverpackcreator/api/config/PackConfig.kt b/serverpackcreator-api/src/main/kotlin/de/griefed/serverpackcreator/api/config/PackConfig.kt index 7282ffbe0..de1dae16d 100644 --- a/serverpackcreator-api/src/main/kotlin/de/griefed/serverpackcreator/api/config/PackConfig.kt +++ b/serverpackcreator-api/src/main/kotlin/de/griefed/serverpackcreator/api/config/PackConfig.kt @@ -151,8 +151,6 @@ private const val spcQuiltInstallerVersionKey = "SPC_QUILT_INSTALLER_VERSION_SPC private const val spcLegacyFabricInstallerVersionKey = "SPC_LEGACYFABRIC_INSTALLER_VERSION_SPC" -private const val spcMinecraftServerUrlKey = "SPC_MINECRAFT_SERVER_URL_SPC" - private const val spcWaitForUserInputKey = "SPC_WAIT_FOR_USER_INPUT_SPC" private const val spcRestartServerKey = "SPC_RESTART_SPC" @@ -178,7 +176,6 @@ private val scriptSettingsDefaultKeys = arrayOf( spcFabricInstallerVersionKey, spcQuiltInstallerVersionKey, spcLegacyFabricInstallerVersionKey, - spcMinecraftServerUrlKey, spcWaitForUserInputKey, spcRestartServerKey, spcSkipJavaCheckKey, diff --git a/serverpackcreator-api/src/main/kotlin/de/griefed/serverpackcreator/api/serverpack/ServerPackHandler.kt b/serverpackcreator-api/src/main/kotlin/de/griefed/serverpackcreator/api/serverpack/ServerPackHandler.kt index 24bc0da0a..c232c1824 100644 --- a/serverpackcreator-api/src/main/kotlin/de/griefed/serverpackcreator/api/serverpack/ServerPackHandler.kt +++ b/serverpackcreator-api/src/main/kotlin/de/griefed/serverpackcreator/api/serverpack/ServerPackHandler.kt @@ -119,17 +119,13 @@ class ServerPackHandler( # - No 'java' command be available OR # - The available Java version behind 'java' be incompatible with your Minecraft version. # JABBA_VERSION has no effect on the installation of Jabba when using PowerShell. - # MINECRAFT_VERSION should be edited manually. If you change this version, then MINECRAFT_SERVER_URL will no longer - # point at the correct server JAR required to run your server. If you find that the Minecraft version is - # incorrect, please contact the creator of this server pack. If you created this server pack yourself, - # please regenerate it with the correct Minecraft version. - # The same applies to MODLOADER_VERSION when you are using NeoForge. + # MINECRAFT_VERSION is tightly coupled with the modloader version. Be careful when changing this, as the new + # new version you set may not be compatible with the modloader and modloader version combination. + # MODLOADER and MODLOADER_VERSION same thing as with MINECRAFT_VERSION. Changing any of these three values may + # have unforseen consequences. Well, I say unforseen, it mostly causes the server to straight up not start, + # because of incompatibilities. Be very careful when changing these! # # DO NOT EDIT THE FOLLOWING VARIABLES MANUALLY - # - MINECRAFT_VERSION - # - MINECRAFT_SERVER_URL - # - MODLOADER - # - MODLOADER_VERSION when using NeoForge. # - FABRIC_INSTALLER_VERSION # - QUILT_INSTALLER_VERSION # - LEGACYFABRIC_INSTALLER_VERSION @@ -144,7 +140,6 @@ class ServerPackHandler( LEGACYFABRIC_INSTALLER_VERSION=SPC_LEGACYFABRIC_INSTALLER_VERSION_SPC FABRIC_INSTALLER_VERSION=SPC_FABRIC_INSTALLER_VERSION_SPC QUILT_INSTALLER_VERSION=SPC_QUILT_INSTALLER_VERSION_SPC - MINECRAFT_SERVER_URL=SPC_MINECRAFT_SERVER_URL_SPC RECOMMENDED_JAVA_VERSION=SPC_RECOMMENDED_JAVA_VERSION_SPC JAVA_ARGS="SPC_JAVA_ARGS_SPC" JAVA="SPC_JAVA_SPC" diff --git a/serverpackcreator-api/src/main/resources/HELP.md b/serverpackcreator-api/src/main/resources/HELP.md index 120b18ca4..c67dbe18d 100644 --- a/serverpackcreator-api/src/main/resources/HELP.md +++ b/serverpackcreator-api/src/main/resources/HELP.md @@ -97,13 +97,11 @@ The following placeholders will be replaced by ServerPackCreator during the crea | SPC_MINECRAFT_VERSION_SPC | The Minecraft version of the modpack from which the server pack is created. | | SPC_MODLOADER_SPC | The modloader of the modpack from which the server pack is created. | | SPC_MODLOADER_VERSION_SPC | The modloader version of the modpack from which the server pack is created. | -| SPC_MINECRAFT_SERVER_URL_SPC | The download URL corresponding to the Minecraft version of the modpack from which the server pack is created. | | SPC_JAVA_ARGS_SPC | Java JVM args which are to be used when running the server pack. | | SPC_JAVA_SPC | `java` by default. Start scripts in ZIP-archives will always receive `java` as the value. You may change the value in the table provided in the GUI if you need a different Java path for local testing and debugging. Scripts in the unzipped server pack will have the custom value avaiable. | | SPC_FABRIC_INSTALLER_VERSION_SPC | The latest release version of the Fabric installer during creation. | | SPC_QUILT_INSTALLER_VERSION_SPC | The latest release version of the Quilt installer during creation. | | SPC_LEGACYFABRIC_INSTALLER_VERSION_SPC | The latest release version of the LegacyFabric installer during creation. | -| SPC_NEOFORGE_INSTALLER_URL_SPC | The URL to the NeoForge installer for the given Minecraft & NeoForge version, supplied during creation. | | SPC_RECOMMENDED_JAVA_VERSION_SPC | The recommended Java version to use with the modded server, as stated by Mojang themselves. | | SPC_WAIT_FOR_USER_INPUT_SPC | true/false allows you to enable/disable user confirmation upon graceful script ending. | | SPC_ADDITIONAL_ARGS_SPC | Additional arguments to supply to the JVM when starting the server. `-Dlog4j2.formatMsgNoLookups=true` by default. | @@ -130,8 +128,6 @@ The contents of the variables are as follows. See `### Default values` above for | LEGACYFABRIC_INSTALLER_VERSION | SPC_LEGACYFABRIC_INSTALLER_VERSION_SPC | | FABRIC_INSTALLER_VERSION | SPC_FABRIC_INSTALLER_VERSION_SPC | | QUILT_INSTALLER_VERSION | SPC_QUILT_INSTALLER_VERSION_SPC | -| NEOFORGE_INSTALLER_URL | SPC_NEOFORGE_INSTALLER_URL_SPC | -| MINECRAFT_SERVER_URL | SPC_MINECRAFT_SERVER_URL_SPC | | RECOMMENDED_JAVA_VERSION | SPC_RECOMMENDED_JAVA_VERSION_SPC | | JAVA_ARGS | "SPC_JAVA_ARGS_SPC" | | JAVA | "SPC_JAVA_SPC" | diff --git a/serverpackcreator-api/src/main/resources/de/griefed/resources/server_files/default_template.ps1 b/serverpackcreator-api/src/main/resources/de/griefed/resources/server_files/default_template.ps1 index 6d94b060e..af6f56896 100644 --- a/serverpackcreator-api/src/main/resources/de/griefed/resources/server_files/default_template.ps1 +++ b/serverpackcreator-api/src/main/resources/de/griefed/resources/server_files/default_template.ps1 @@ -101,7 +101,6 @@ $ModLoaderVersion = $ExternalVariables['MODLOADER_VERSION'] $LegacyFabricInstallerVersion = $ExternalVariables['LEGACYFABRIC_INSTALLER_VERSION'] $FabricInstallerVersion = $ExternalVariables['FABRIC_INSTALLER_VERSION'] $QuiltInstallerVersion = $ExternalVariables['QUILT_INSTALLER_VERSION'] -$MinecraftServerUrl = $ExternalVariables['MINECRAFT_SERVER_URL'] $JavaArgs = $ExternalVariables['JAVA_ARGS'] $Java = $ExternalVariables['JAVA'] $WaitForUserInput = $ExternalVariables['WAIT_FOR_USER_INPUT'] @@ -128,7 +127,6 @@ if ($JavaArgs[$JavaArgs.Length - 1] -eq '"') $JavaArgs = $JavaArgs.Substring(0, $JavaArgs.Length - 1) } -$MinecraftServerJarLocation = "do_not_manually_edit" $LauncherJarLocation = "do_not_manually_edit" $ServerRunCommand = "do_not_manually_edit" $JavaVersion = "do_not_manually_edit" @@ -280,7 +278,6 @@ Function global:SetupForge { $ForgeJarLocation = "forge.jar" $script:LauncherJarLocation = "forge.jar" - $script:MinecraftServerJarLocation = "minecraft_server.${MinecraftVersion}.jar" $script:ServerRunCommand = "${JavaArgs} -jar ${LauncherJarLocation} nogui" if ((DownloadIfNotExists "${ForgeJarLocation}" "forge-installer.jar" "${ForgeInstallerUrl}")) @@ -397,7 +394,6 @@ Function global:SetupFabric { "Installer downloaded..." $script:LauncherJarLocation = "fabric-server-launch.jar" - $script:MinecraftServerJarLocation = "server.jar" RunJavaCommand "-jar fabric-installer.jar server -mcversion ${MinecraftVersion} -loader ${ModLoaderVersion} -downloadMinecraft" if ((Test-Path -Path 'fabric-server-launch.jar' -PathType Leaf)) { @@ -413,8 +409,8 @@ Function global:SetupFabric } else { - $script:LauncherJarLocation = "fabric-server-launcher.jar" - $script:MinecraftServerJarLocation = "server.jar" + "fabric-server-launch.jar present. Moving on..." + $script:LauncherJarLocation = "fabric-server-launch.jar" } } $script:ServerRunCommand = "${script:JavaArgs} -jar ${script:LauncherJarLocation} nogui" @@ -445,7 +441,6 @@ Function global:SetupQuilt } } $script:LauncherJarLocation = "quilt-server-launch.jar" - $script:MinecraftServerJarLocation = "server.jar" $script:ServerRunCommand = "${JavaArgs} -jar ${LauncherJarLocation} nogui" } @@ -474,22 +469,9 @@ Function global:SetupLegacyFabric } } $script:LauncherJarLocation = "fabric-server-launch.jar" - $script:MinecraftServerJarLocation = "server.jar" $script:ServerRunCommand = "${JavaArgs} -jar ${LauncherJarLocation} nogui" } -Function global:Minecraft -{ - if (($ModLoader -eq "Fabric") -and (${ImprovedFabricLauncherAvailable} -eq "200")) - { - "Skipping Minecraft Server JAR checks because we are using the improved Fabric Server Launcher." - } - elseif (${MinecraftServerJarLocation} -ne "do_not_manually_edit") - { - (DownloadIfNotExists "${MinecraftServerJarLocation}" "${MinecraftServerJarLocation}" "${MinecraftServerUrl}") > $null - } -} - Function Eula { if (!(Test-Path -Path 'eula.txt' -PathType Leaf)) @@ -556,7 +538,6 @@ switch (${ModLoader}) } CheckJavaBitness -Minecraft Eula "" @@ -567,8 +548,6 @@ Eula "LegacyFabric Installer Version: ${LegacyFabricInstallerVersion}" "Fabric Installer Version: ${FabricInstallerVersion}" "Quilt Installer Version: ${QuiltInstallerVersion}" -"NeoForge Installer URL: ${NeoForgeInstallerUrl}" -"Minecraft Server URL: ${MinecraftServerUrl}" "Java Args: ${JavaArgs}" "Additional Args: ${AdditionalArgs}" "Java Path: ${Java}" diff --git a/serverpackcreator-api/src/main/resources/de/griefed/resources/server_files/default_template.sh b/serverpackcreator-api/src/main/resources/de/griefed/resources/server_files/default_template.sh index 817b086dc..7fc811ba6 100644 --- a/serverpackcreator-api/src/main/resources/de/griefed/resources/server_files/default_template.sh +++ b/serverpackcreator-api/src/main/resources/de/griefed/resources/server_files/default_template.sh @@ -88,7 +88,6 @@ fi source "variables.txt" -MINECRAFT_SERVER_JAR_LOCATION="do_not_manually_edit" LAUNCHER_JAR_LOCATION="do_not_manually_edit" SERVER_RUN_COMMAND="do_not_manually_edit" JAVA_VERSION="do_not_manually_edit" @@ -189,7 +188,6 @@ setup_forge() { if [[ ${SEMANTICS[1]} -le 16 ]]; then FORGE_JAR_LOCATION="forge.jar" LAUNCHER_JAR_LOCATION="forge.jar" - MINECRAFT_SERVER_JAR_LOCATION="minecraft_server.${MINECRAFT_VERSION}.jar" SERVER_RUN_COMMAND="${JAVA_ARGS} -jar ${LAUNCHER_JAR_LOCATION} nogui" if [[ $(downloadIfNotExist "${FORGE_JAR_LOCATION}" "forge-installer.jar" "${FORGE_INSTALLER_URL}") == "true" ]]; then @@ -269,9 +267,18 @@ setup_fabric() { FABRIC_INSTALLER_URL="https://maven.fabricmc.net/net/fabricmc/fabric-installer/${FABRIC_INSTALLER_VERSION}/fabric-installer-${FABRIC_INSTALLER_VERSION}.jar" FABRIC_CHECK_URL="https://meta.fabricmc.net/v2/versions/loader/${MINECRAFT_VERSION}/${MODLOADER_VERSION}/server/json" - FABRIC_AVAILABLE="$(curl -LI ${FABRIC_CHECK_URL} -o /dev/null -w '%{http_code}\n' -s)" IMPROVED_FABRIC_LAUNCHER_URL="https://meta.fabricmc.net/v2/versions/loader/${MINECRAFT_VERSION}/${MODLOADER_VERSION}/${FABRIC_INSTALLER_VERSION}/server/jar" - IMPROVED_FABRIC_LAUNCHER_AVAILABLE="$(curl -LI ${IMPROVED_FABRIC_LAUNCHER_URL} -o /dev/null -w '%{http_code}\n' -s)" + + if commandAvailable curl ; then + FABRIC_AVAILABLE="$(curl -LI ${FABRIC_CHECK_URL} -o /dev/null -w '%{http_code}\n' -s)" + elif commandAvailable wget ; then + FABRIC_AVAILABLE="$(wget --server-response ${FABRIC_CHECK_URL} 2>&1 | awk '/^ HTTP/{print $2}')" + fi + if commandAvailable curl ; then + IMPROVED_FABRIC_LAUNCHER_AVAILABLE="$(curl -LI ${IMPROVED_FABRIC_LAUNCHER_URL} -o /dev/null -w '%{http_code}\n' -s)" + elif commandAvailable wget ; then + IMPROVED_FABRIC_LAUNCHER_AVAILABLE="$(wget --server-response ${IMPROVED_FABRIC_LAUNCHER_URL} 2>&1 | awk '/^ HTTP/{print $2}')" + fi if [[ "$IMPROVED_FABRIC_LAUNCHER_AVAILABLE" == "200" ]]; then echo "Improved Fabric Server Launcher available..." @@ -284,7 +291,6 @@ setup_fabric() { echo "Installer downloaded..." LAUNCHER_JAR_LOCATION="fabric-server-launch.jar" - MINECRAFT_SERVER_JAR_LOCATION="server.jar" runJavaCommand "-jar fabric-installer.jar server -mcversion ${MINECRAFT_VERSION} -loader ${MODLOADER_VERSION} -downloadMinecraft" if [[ -s "fabric-server-launch.jar" ]]; then @@ -298,8 +304,7 @@ setup_fabric() { else echo "fabric-server-launch.jar present. Moving on..." - LAUNCHER_JAR_LOCATION="fabric-server-launcher.jar" - MINECRAFT_SERVER_JAR_LOCATION="server.jar" + LAUNCHER_JAR_LOCATION="fabric-server-launch.jar" fi SERVER_RUN_COMMAND="${JAVA_ARGS} -jar ${LAUNCHER_JAR_LOCATION} nogui" @@ -311,7 +316,11 @@ setup_quilt() { QUILT_INSTALLER_URL="https://maven.quiltmc.org/repository/release/org/quiltmc/quilt-installer/${QUILT_INSTALLER_VERSION}/quilt-installer-${QUILT_INSTALLER_VERSION}.jar" QUILT_CHECK_URL="https://meta.fabricmc.net/v2/versions/intermediary/${MINECRAFT_VERSION}" - QUILT_AVAILABLE="$(curl -LI ${QUILT_CHECK_URL} -o /dev/null -w '%{http_code}\n' -s)" + if commandAvailable curl ; then + QUILT_AVAILABLE="$(curl -LI ${QUILT_CHECK_URL} -o /dev/null -w '%{http_code}\n' -s)" + elif commandAvailable wget ; then + QUILT_AVAILABLE="$(wget --server-response ${QUILT_CHECK_URL} 2>&1 | awk '/^ HTTP/{print $2}')" + fi if [[ "${#QUILT_AVAILABLE}" -eq "2" ]]; then crashServer "Quilt is not available for Minecraft ${MINECRAFT_VERSION}, Quilt ${MODLOADER_VERSION}." @@ -330,7 +339,6 @@ setup_quilt() { fi LAUNCHER_JAR_LOCATION="quilt-server-launch.jar" - MINECRAFT_SERVER_JAR_LOCATION="server.jar" SERVER_RUN_COMMAND="${JAVA_ARGS} -jar ${LAUNCHER_JAR_LOCATION} nogui" } @@ -340,7 +348,11 @@ setup_legacyfabric() { LEGACYFABRIC_INSTALLER_URL="https://maven.legacyfabric.net/net/legacyfabric/fabric-installer/${LEGACYFABRIC_INSTALLER_VERSION}/fabric-installer-${LEGACYFABRIC_INSTALLER_VERSION}.jar" LEGACYFABRIC_CHECK_URL="https://meta.legacyfabric.net/v2/versions/loader/${MINECRAFT_VERSION}" - LEGACYFABRIC_AVAILABLE="$(curl -LI ${LEGACYFABRIC_CHECK_URL} -o /dev/null -w '%{http_code}\n' -s)" + if commandAvailable curl ; then + LEGACYFABRIC_AVAILABLE="$(curl -LI ${LEGACYFABRIC_CHECK_URL} -o /dev/null -w '%{http_code}\n' -s)" + elif commandAvailable wget ; then + IMPROVED_FABRIC_LAUNCHER_AVAILABLE="$(wget --server-response ${LEGACYFABRIC_CHECK_URL} 2>&1 | awk '/^ HTTP/{print $2}')" + fi if [[ "${#LEGACYFABRIC_AVAILABLE}" -eq "2" ]]; then crashServer "LegacyFabric is not available for Minecraft ${MINECRAFT_VERSION}, LegacyFabric ${MODLOADER_VERSION}." @@ -359,19 +371,9 @@ setup_legacyfabric() { fi LAUNCHER_JAR_LOCATION="fabric-server-launch.jar" - MINECRAFT_SERVER_JAR_LOCATION="server.jar" SERVER_RUN_COMMAND="${JAVA_ARGS} -jar ${LAUNCHER_JAR_LOCATION} nogui" } -minecraft() { - echo "" - if [[ "${MODLOADER}" == "Fabric" && "$IMPROVED_FABRIC_LAUNCHER_AVAILABLE" == "200" ]]; then - echo "Skipping Minecraft Server JAR checks because we are using the improved Fabric Server Launcher." - elif [[ "${MINECRAFT_SERVER_JAR_LOCATION}" != "do_not_manually_edit" ]]; then - downloadIfNotExist "${MINECRAFT_SERVER_JAR_LOCATION}" "${MINECRAFT_SERVER_JAR_LOCATION}" "${MINECRAFT_SERVER_URL}" >/dev/null - fi -} - eula() { echo "" if [[ ! -s "eula.txt" ]]; then @@ -432,7 +434,6 @@ case ${MODLOADER} in esac checkJavaBitness -minecraft eula echo "" @@ -443,7 +444,6 @@ echo "Modloader version: ${MODLOADER_VERSION}" echo "LegacyFabric Installer Version: ${LEGACYFABRIC_INSTALLER_VERSION}" echo "Fabric Installer Version: ${FABRIC_INSTALLER_VERSION}" echo "Quilt Installer Version: ${QUILT_INSTALLER_VERSION}" -echo "Minecraft Server URL: ${MINECRAFT_SERVER_URL}" echo "Java Args: ${JAVA_ARGS}" echo "Additional Args: ${ADDITIONAL_ARGS}" echo "Java Path: ${JAVA}" diff --git a/serverpackcreator-api/src/test/kotlin/de/griefed/serverpackcreator/api/ConfigurationHandlerTest.kt b/serverpackcreator-api/src/test/kotlin/de/griefed/serverpackcreator/api/ConfigurationHandlerTest.kt index cb10c6391..b068ad0ca 100644 --- a/serverpackcreator-api/src/test/kotlin/de/griefed/serverpackcreator/api/ConfigurationHandlerTest.kt +++ b/serverpackcreator-api/src/test/kotlin/de/griefed/serverpackcreator/api/ConfigurationHandlerTest.kt @@ -341,9 +341,6 @@ internal class ConfigurationHandlerTest { Assertions.assertTrue(check.serverIconChecksPassed) Assertions.assertTrue(check.serverPropertiesChecksPassed) Assertions.assertTrue(check.modloaderVersionChecksPassed) - Assertions.assertTrue( - packConfig.scriptSettings.containsKey("SPC_MINECRAFT_SERVER_URL_SPC") - ) Assertions.assertTrue( packConfig.scriptSettings.containsKey("SPC_SERVERPACKCREATOR_VERSION_SPC") ) @@ -383,11 +380,6 @@ internal class ConfigurationHandlerTest { packConfig.scriptSettings["SPC_JAVA_ARGS_SPC"] ) Assertions.assertEquals("java", packConfig.scriptSettings["SPC_JAVA_SPC"]) - Assertions.assertEquals( - versionMeta.minecraft.getServer(packConfig.minecraftVersion).get().url() - .get().toString(), - packConfig.scriptSettings["SPC_MINECRAFT_SERVER_URL_SPC"] - ) Assertions.assertEquals( apiProperties.apiVersion, packConfig.scriptSettings["SPC_SERVERPACKCREATOR_VERSION_SPC"] diff --git a/serverpackcreator-api/src/test/kotlin/de/griefed/serverpackcreator/api/ServerPackHandlerTest.kt b/serverpackcreator-api/src/test/kotlin/de/griefed/serverpackcreator/api/ServerPackHandlerTest.kt index fed584c23..51617ebad 100644 --- a/serverpackcreator-api/src/test/kotlin/de/griefed/serverpackcreator/api/ServerPackHandlerTest.kt +++ b/serverpackcreator-api/src/test/kotlin/de/griefed/serverpackcreator/api/ServerPackHandlerTest.kt @@ -110,13 +110,6 @@ internal class ServerPackHandlerTest { Assertions.assertTrue(variables.contains("LEGACYFABRIC_INSTALLER_VERSION=${versionMeta.legacyFabric.releaseInstaller()}")) Assertions.assertTrue(variables.contains("FABRIC_INSTALLER_VERSION=${versionMeta.fabric.releaseInstaller()}")) Assertions.assertTrue(variables.contains("QUILT_INSTALLER_VERSION=${versionMeta.quilt.releaseInstaller()}")) - Assertions.assertTrue( - variables.contains( - "MINECRAFT_SERVER_URL=${ - versionMeta.minecraft.getServer(packConfig.minecraftVersion).get().url().get() - }" - ) - ) Assertions.assertTrue(variables.contains("JAVA_ARGS=${packConfig.javaArgs}")) Assertions.assertTrue(variables.contains("JAVA=\"C\\:\\\\Program Files\\\\Java\\\\jdk1.8.0_301\\\\bin\\\\java.exe\"")) diff --git a/serverpackcreator-api/src/test/resources/custom_template.ps1 b/serverpackcreator-api/src/test/resources/custom_template.ps1 index 4958bc18a..9acbe03cf 100644 --- a/serverpackcreator-api/src/test/resources/custom_template.ps1 +++ b/serverpackcreator-api/src/test/resources/custom_template.ps1 @@ -24,7 +24,6 @@ $Java = "SPC_JAVA_SPC" $LegacyFabricInstallerVersion = "SPC_LEGACYFABRIC_INSTALLER_VERSION_SPC" $FabricInstallerVersion = "SPC_FABRIC_INSTALLER_VERSION_SPC" $QuiltInstallerVersion = "SPC_QUILT_INSTALLER_VERSION_SPC" -$MinecraftServerUrl = "SPC_MINECRAFT_SERVER_URL_SPC" # Variables with do_not_manually_edit are set automatically during script execution, # so manually editing them will have no effect, as they will be overridden. diff --git a/serverpackcreator-api/src/test/resources/custom_template.sh b/serverpackcreator-api/src/test/resources/custom_template.sh index 77b52931d..cddaa4e32 100644 --- a/serverpackcreator-api/src/test/resources/custom_template.sh +++ b/serverpackcreator-api/src/test/resources/custom_template.sh @@ -23,7 +23,6 @@ JAVA="SPC_JAVA_SPC" LEGACYFABRIC_INSTALLER_VERSION="SPC_LEGACYFABRIC_INSTALLER_VERSION_SPC" FABRIC_INSTALLER_VERSION="SPC_FABRIC_INSTALLER_VERSION_SPC" QUILT_INSTALLER_VERSION="SPC_QUILT_INSTALLER_VERSION_SPC" -MINECRAFT_SERVER_URL="SPC_MINECRAFT_SERVER_URL_SPC" # Variables with do_not_manually_edit are set automatically during script execution, # so manually editing them will have no effect, as they will be overridden. diff --git a/serverpackcreator-api/src/test/resources/serverpackcreator.properties b/serverpackcreator-api/src/test/resources/serverpackcreator.properties index 0efc3591e..6b5d9a8b3 100644 --- a/serverpackcreator-api/src/test/resources/serverpackcreator.properties +++ b/serverpackcreator-api/src/test/resources/serverpackcreator.properties @@ -1,5 +1,5 @@ #For details about each property, see https://help.serverpackcreator.de/settings-and-configs.html -#Sun Jul 21 10:01:46 CEST 2024 +#Mon Jul 22 21:47:06 CEST 2024 de.griefed.serverpackcreator.configuration.aikar=-Xms4G -Xmx4G -XX\:+UseG1GC -XX\:+ParallelRefProcEnabled -XX\:MaxGCPauseMillis\=200 -XX\:+UnlockExperimentalVMOptions -XX\:+DisableExplicitGC -XX\:+AlwaysPreTouch -XX\:G1NewSizePercent\=30 -XX\:G1MaxNewSizePercent\=40 -XX\:G1HeapRegionSize\=8M -XX\:G1ReservePercent\=20 -XX\:G1HeapWastePercent\=5 -XX\:G1MixedGCCountTarget\=4 -XX\:InitiatingHeapOccupancyPercent\=15 -XX\:G1MixedGCLiveThresholdPercent\=90 -XX\:G1RSetUpdatingPauseTimePercent\=5 -XX\:SurvivorRatio\=32 -XX\:+PerfDisableSharedMem -XX\:MaxTenuringThreshold\=1 -Dusing.aikars.flags\=https\://mcflags.emc.gs -Daikars.new.flags\=true de.griefed.serverpackcreator.configuration.directories.mustinclude=mods,config,kubejs,defaultconfigs,scripts de.griefed.serverpackcreator.configuration.directories.shouldexclude=overrides,packmenu,resourcepacks,server_pack,fancymenu,libraries,downloads,logs,profileImage,resourcepacks,screenshots,shaderpacks,tv-cache,asm diff --git a/serverpackcreator-help/Writerside/topics/HELP.md b/serverpackcreator-help/Writerside/topics/HELP.md index 120b18ca4..c67dbe18d 100644 --- a/serverpackcreator-help/Writerside/topics/HELP.md +++ b/serverpackcreator-help/Writerside/topics/HELP.md @@ -97,13 +97,11 @@ The following placeholders will be replaced by ServerPackCreator during the crea | SPC_MINECRAFT_VERSION_SPC | The Minecraft version of the modpack from which the server pack is created. | | SPC_MODLOADER_SPC | The modloader of the modpack from which the server pack is created. | | SPC_MODLOADER_VERSION_SPC | The modloader version of the modpack from which the server pack is created. | -| SPC_MINECRAFT_SERVER_URL_SPC | The download URL corresponding to the Minecraft version of the modpack from which the server pack is created. | | SPC_JAVA_ARGS_SPC | Java JVM args which are to be used when running the server pack. | | SPC_JAVA_SPC | `java` by default. Start scripts in ZIP-archives will always receive `java` as the value. You may change the value in the table provided in the GUI if you need a different Java path for local testing and debugging. Scripts in the unzipped server pack will have the custom value avaiable. | | SPC_FABRIC_INSTALLER_VERSION_SPC | The latest release version of the Fabric installer during creation. | | SPC_QUILT_INSTALLER_VERSION_SPC | The latest release version of the Quilt installer during creation. | | SPC_LEGACYFABRIC_INSTALLER_VERSION_SPC | The latest release version of the LegacyFabric installer during creation. | -| SPC_NEOFORGE_INSTALLER_URL_SPC | The URL to the NeoForge installer for the given Minecraft & NeoForge version, supplied during creation. | | SPC_RECOMMENDED_JAVA_VERSION_SPC | The recommended Java version to use with the modded server, as stated by Mojang themselves. | | SPC_WAIT_FOR_USER_INPUT_SPC | true/false allows you to enable/disable user confirmation upon graceful script ending. | | SPC_ADDITIONAL_ARGS_SPC | Additional arguments to supply to the JVM when starting the server. `-Dlog4j2.formatMsgNoLookups=true` by default. | @@ -130,8 +128,6 @@ The contents of the variables are as follows. See `### Default values` above for | LEGACYFABRIC_INSTALLER_VERSION | SPC_LEGACYFABRIC_INSTALLER_VERSION_SPC | | FABRIC_INSTALLER_VERSION | SPC_FABRIC_INSTALLER_VERSION_SPC | | QUILT_INSTALLER_VERSION | SPC_QUILT_INSTALLER_VERSION_SPC | -| NEOFORGE_INSTALLER_URL | SPC_NEOFORGE_INSTALLER_URL_SPC | -| MINECRAFT_SERVER_URL | SPC_MINECRAFT_SERVER_URL_SPC | | RECOMMENDED_JAVA_VERSION | SPC_RECOMMENDED_JAVA_VERSION_SPC | | JAVA_ARGS | "SPC_JAVA_ARGS_SPC" | | JAVA | "SPC_JAVA_SPC" |