diff --git a/README.md b/README.md index 38b3354..97e1005 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,19 @@ # GeyserMC Pterodactyl Stuff This repo contains the eggs for GeyserMC and the docker images for auto update support used by the eggs, for Pterodactyl Panel. -## Geyser -### [PaperMC](https://papermc.io/downloads/paper) + Geyser + Floodgate +## Paper + Geyser / Floodgate eggs + +The Paper eggs use the [Paper API v3](https://docs.papermc.io/misc/downloads-service/) (`fill.papermc.io`) and [ptero-eggs](https://github.com/ptero-eggs/yolks) Java images. Paper, Geyser, and Floodgate are fetched at **install/reinstall** time. + +### Eggs + +#### [PaperMC](https://papermc.io/downloads/paper) + Geyser + Floodgate * Egg: `egg-paper--geyser--floodgate.json` +#### [PaperMC](https://papermc.io/downloads/paper) + Floodgate +* Egg: `egg-paper--floodgate.json` + +## Geyser ### [Velocity](https://papermc.io/downloads/velocity) + Geyser + Floodgate * Egg: `egg-velocity--geyser--floodgate.json` @@ -15,7 +24,3 @@ This repo contains the eggs for GeyserMC and the docker images for auto update s ### Geyser: Standalone + [GeyserConnect](https://github.com/GeyserMC/GeyserConnect) * Egg: `egg-geyser-connect.json` * Container: Uses the normal Pterodactyl Geyser container and loads the extension in - -## Floodgate (Only) -### [PaperMC](https://papermc.io/downloads/paper) + Floodgate -* Egg: `egg-paper--floodgate.json` diff --git a/egg-paper--floodgate.json b/egg-paper--floodgate.json index 3dd9f5f..ebc0a0c 100644 --- a/egg-paper--floodgate.json +++ b/egg-paper--floodgate.json @@ -9,27 +9,31 @@ "author": "parker@pterodactyl.io", "description": "High performance Spigot fork that aims to fix gameplay and mechanics inconsistencies.", "features": [ - "eula" + "eula", + "java_version", + "pid_limit" ], "docker_images": { - "ghcr.io\/pterodactyl\/yolks:java_21": "ghcr.io\/pterodactyl\/yolks:java_21", - "ghcr.io\/pterodactyl\/yolks:java_17": "ghcr.io\/pterodactyl\/yolks:java_17", - "ghcr.io\/pterodactyl\/yolks:java_16": "ghcr.io\/pterodactyl\/yolks:java_16", - "quay.io\/pterodactyl\/yolks:java_11": "quay.io\/pterodactyl\/yolks:java_11", - "quay.io\/pterodactyl\/yolks:java_8": "quay.io\/pterodactyl\/yolks:java_8" + "Java 25": "ghcr.io/ptero-eggs/yolks:java_25", + "Java 22": "ghcr.io/ptero-eggs/yolks:java_22", + "Java 21": "ghcr.io/ptero-eggs/yolks:java_21", + "Java 17": "ghcr.io/ptero-eggs/yolks:java_17", + "Java 16": "ghcr.io/ptero-eggs/yolks:java_16", + "Java 11": "ghcr.io/ptero-eggs/yolks:java_11", + "Java 8": "ghcr.io/ptero-eggs/yolks:java_8" }, "file_denylist": [], "startup": "java -Xms128M -XX:MaxRAMPercentage=95.0 -Dterminal.jline=false -Dterminal.ansi=true -jar {{SERVER_JARFILE}}", "config": { - "files": "{\r\n \"server.properties\": {\r\n \"parser\": \"properties\",\r\n \"find\": {\r\n \"server-ip\": \"0.0.0.0\",\r\n \"server-port\": \"{{server.build.default.port}}\"\r\n }\r\n }\r\n}", - "startup": "{\r\n \"done\": \")! For help, type \",\r\n \"userInteraction\": [\r\n \"Go to eula.txt for more info.\"\r\n ]\r\n}", + "files": "{\r\n \"server.properties\": {\r\n \"parser\": \"properties\",\r\n \"find\": {\r\n \"server-ip\": \"0.0.0.0\",\r\n \"server-port\": \"{{env.JAVA_PORT}}\",\r\n \"query.port\": \"{{env.JAVA_PORT}}\"\r\n }\r\n }\r\n}", + "startup": "{\"done\":\")! For help, type \"}", "logs": "{}", "stop": "stop" }, "scripts": { "installation": { - "script": "#!\/bin\/ash\r\n# Paper+Floodgate Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\nPROJECT=paper\r\nif [ -n \"${DL_PATH}\" ]; then\r\necho -e \"Using supplied download url: ${DL_PATH}\"\r\nDOWNLOAD_URL=`eval echo $(echo ${DL_PATH} | sed -e 's\/{{\/${\/g' -e 's\/}}\/}\/g')`\r\nelse\r\nVER_EXISTS=`curl -s https:\/\/api.papermc.io\/v2\/projects\/${PROJECT} | jq -r --arg VERSION $MINECRAFT_VERSION '.versions[] | contains($VERSION)' | grep -m1 true`\r\nLATEST_VERSION=`curl -s https:\/\/api.papermc.io\/v2\/projects\/${PROJECT} | jq -r '.versions' | jq -r '.[-1]'`\r\nif [ \"${VER_EXISTS}\" == \"true\" ]; then\r\necho -e \"Version is valid. Using version ${MINECRAFT_VERSION}\"\r\nelse\r\necho -e \"Using the latest ${PROJECT} version\"\r\nMINECRAFT_VERSION=${LATEST_VERSION}\r\nfi\r\nBUILD_EXISTS=`curl -s https:\/\/api.papermc.io\/v2\/projects\/${PROJECT}\/versions\/${MINECRAFT_VERSION} | jq -r --arg BUILD ${BUILD_NUMBER} '.builds[] | tostring | contains($BUILD)' | grep -m1 true`\r\nLATEST_BUILD=`curl -s https:\/\/api.papermc.io\/v2\/projects\/${PROJECT}\/versions\/${MINECRAFT_VERSION} | jq -r '.builds' | jq -r '.[-1]'`\r\nif [ \"${BUILD_EXISTS}\" == \"true\" ]; then\r\necho -e \"Build is valid for version ${MINECRAFT_VERSION}. Using build ${BUILD_NUMBER}\"\r\nelse\r\necho -e \"Using the latest ${PROJECT} build for version ${MINECRAFT_VERSION}\"\r\nBUILD_NUMBER=${LATEST_BUILD}\r\nfi\r\nJAR_NAME=${PROJECT}-${MINECRAFT_VERSION}-${BUILD_NUMBER}.jar\r\necho \"Version being downloaded\"\r\necho -e \"MC Version: ${MINECRAFT_VERSION}\"\r\necho -e \"Build: ${BUILD_NUMBER}\"\r\necho -e \"JAR Name of Build: ${JAR_NAME}\"\r\nDOWNLOAD_URL=https:\/\/api.papermc.io\/v2\/projects\/${PROJECT}\/versions\/${MINECRAFT_VERSION}\/builds\/${BUILD_NUMBER}\/downloads\/${JAR_NAME}\r\nfi\r\ncd \/mnt\/server\r\necho -e \"Running curl -o ${SERVER_JARFILE} ${DOWNLOAD_URL}\"\r\nif [ -f ${SERVER_JARFILE} ]; then\r\nmv ${SERVER_JARFILE} ${SERVER_JARFILE}.old\r\nfi\r\ncurl -o ${SERVER_JARFILE} ${DOWNLOAD_URL}\r\nif [ ! -f server.properties ]; then\r\necho -e \"Downloading MC server.properties\"\r\ncurl -o server.properties https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/minecraft\/java\/server.properties\r\nfi\r\nmkdir plugins\r\necho -e \"Downloading Floodgate\"\r\nFLOODGATE_HASH=`curl -L https:\/\/download.geysermc.org\/v2\/projects\/floodgate\/versions\/latest\/builds\/latest | jq -r .downloads.spigot.sha256`\r\ncurl -o plugins\/floodgate-spigot.jar -L https:\/\/download.geysermc.org\/v2\/projects\/floodgate\/versions\/latest\/builds\/latest\/downloads\/spigot\r\necho \"${FLOODGATE_HASH} plugins\/floodgate-spigot.jar\" | sha256sum -c\r\nRESULT=$?\r\nif [[ $RESULT -eq 0 ]]; then\r\necho \"Floodgate SHA256 match\"\r\nelse\r\necho \"SHA256 does not match! Aborting...\"\r\nrm plugins\/floodgate-spigot.jar\r\nexit 1\r\nfi", - "container": "ghcr.io\/pterodactyl\/installers:alpine", + "script": "#!/bin/ash\r\n# Paper+Floodgate Installation Script\r\n#\r\n# Server Files: /mnt/server\r\nPROJECT=paper\r\nUSER_AGENT=\"Pterodactyl (https://Pterodactyl.io)\"\r\n\r\nif [ -n \"${DL_PATH}\" ]; then\r\n\techo -e \"Using supplied download url: ${DL_PATH}\"\r\n\tDOWNLOAD_URL=`eval echo $(echo ${DL_PATH} | sed -e 's/{{/${/g' -e 's/}}/}/g')`\r\nelse\r\n\tVER_EXISTS=`curl --user-agent \"${USER_AGENT}\" -s https://fill.papermc.io/v3/projects/${PROJECT} | jq -r --arg VERSION \"${MINECRAFT_VERSION}\" '.versions | any(.[]; index($VERSION))' | grep -m1 true`\r\n\tLATEST_VERSION=`curl --user-agent \"${USER_AGENT}\" -s https://fill.papermc.io/v3/projects/${PROJECT} | jq -r '.versions | to_entries | .[0].value[0]'`\r\n\r\n\tif [ \"${VER_EXISTS}\" = \"true\" ]; then\r\n\t\techo -e \"Version is valid. Using version ${MINECRAFT_VERSION}\"\r\n\telse\r\n\t\techo -e \"Specified version not found. Defaulting to the latest ${PROJECT} version\"\r\n\t\tMINECRAFT_VERSION=${LATEST_VERSION}\r\n\tfi\r\n\r\n\tBUILD_EXISTS=`curl --user-agent \"${USER_AGENT}\" -s https://fill.papermc.io/v3/projects/${PROJECT}/versions/${MINECRAFT_VERSION} | jq -r --arg BUILD \"${BUILD_NUMBER}\" '.builds[] | tostring | contains($BUILD)' | grep -m1 true`\r\n\tLATEST_BUILD=`curl --user-agent \"${USER_AGENT}\" -s https://fill.papermc.io/v3/projects/${PROJECT}/versions/${MINECRAFT_VERSION} | jq -r '.builds | .[0]'`\r\n\r\n\tif [ \"${BUILD_EXISTS}\" = \"true\" ]; then\r\n\t\techo -e \"Build is valid for version ${MINECRAFT_VERSION}. Using build ${BUILD_NUMBER}\"\r\n\telse\r\n\t\techo -e \"Using the latest ${PROJECT} build for version ${MINECRAFT_VERSION}\"\r\n\t\tBUILD_NUMBER=${LATEST_BUILD}\r\n\tfi\r\n\r\n\techo \"Version being downloaded\"\r\n\techo -e \"Project: ${PROJECT}\"\r\n\techo -e \"MC Version: ${MINECRAFT_VERSION}\"\r\n\techo -e \"Build: ${BUILD_NUMBER}\"\r\n\tDOWNLOAD_URL=`curl --user-agent \"${USER_AGENT}\" -s https://fill.papermc.io/v3/projects/${PROJECT}/versions/${MINECRAFT_VERSION}/builds/${BUILD_NUMBER} | jq -r '.downloads.\"server:default\".url'`\r\nfi\r\n\r\ncd /mnt/server\r\n\r\necho -e \"Running curl --user-agent \\\"${USER_AGENT}\\\" -o ${SERVER_JARFILE} ${DOWNLOAD_URL}\"\r\n\r\nif [ -f ${SERVER_JARFILE} ]; then\r\n\tmv ${SERVER_JARFILE} ${SERVER_JARFILE}.old\r\nfi\r\n\r\ncurl --user-agent \"${USER_AGENT}\" -o ${SERVER_JARFILE} ${DOWNLOAD_URL}\r\n\r\nif [ ! -f server.properties ]; then\r\n\techo -e \"Downloading MC server.properties\"\r\n\tcurl --user-agent \"${USER_AGENT}\" -o server.properties https://raw.githubusercontent.com/pterodactyl/game-eggs/main/minecraft/java/server.properties\r\nfi\r\n\r\n\r\nmkdir -p plugins\r\necho -e \"Downloading Floodgate\"\r\nFLOODGATE_HASH=`curl -L -s https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest | jq -r .downloads.spigot.sha256`\r\ncurl -o plugins/floodgate-spigot.jar -L https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot\r\necho \"${FLOODGATE_HASH} plugins/floodgate-spigot.jar\" | sha256sum -c\r\nRESULT=$?\r\nif [ \"${RESULT}\" -ne 0 ]; then\r\n\techo \"SHA256 does not match! Aborting...\"\r\n\trm -f plugins/floodgate-spigot.jar\r\n\texit 1\r\nfi\r\necho \"Floodgate SHA256 match\"\r\n", + "container": "ghcr.io/ptero-eggs/installers:alpine", "entrypoint": "ash" } }, @@ -40,18 +44,18 @@ "env_variable": "MINECRAFT_VERSION", "default_value": "latest", "user_viewable": true, - "user_editable": false, + "user_editable": true, "rules": "nullable|string|max:20", "field_type": "text" }, { "name": "Server Jar File", - "description": "Server Jarfile, by default this is set to 'server.jar'.\r\nSet it to otherwise if you wish to have a different jarfile name.", + "description": "The name of the server jarfile to run the server with.", "env_variable": "SERVER_JARFILE", "default_value": "server.jar", "user_viewable": true, "user_editable": true, - "rules": "required|regex:\/^([\\w\\d._-]+)(\\.jar)$\/", + "rules": "required|regex:/^([\\w\\d._-]+)(\\.jar)$/", "field_type": "text" }, { @@ -70,9 +74,19 @@ "env_variable": "BUILD_NUMBER", "default_value": "latest", "user_viewable": true, - "user_editable": false, + "user_editable": true, "rules": "required|string|max:20", "field_type": "text" + }, + { + "name": "Java Server Port", + "description": "TCP port for the Minecraft Java server (server.properties). Set this to match your server's primary allocation.", + "env_variable": "JAVA_PORT", + "default_value": "25565", + "user_viewable": true, + "user_editable": true, + "rules": "required|string|max:6", + "field_type": "text" } ] -} \ No newline at end of file +} diff --git a/egg-paper--geyser--floodgate.json b/egg-paper--geyser--floodgate.json index 6c8538b..f1aed42 100644 --- a/egg-paper--geyser--floodgate.json +++ b/egg-paper--geyser--floodgate.json @@ -9,25 +9,31 @@ "author": "support@geysermc.org", "description": "High performance Spigot fork that aims to fix gameplay and mechanics inconsistencies.\r\n\r\nThis customized egg will install the GeyserMC and Floodgate plugins as well. This allows Bedrock players to connect to the server without needing a Java account.", "features": [ - "eula" + "eula", + "java_version", + "pid_limit" ], "docker_images": { - "ghcr.io\/pterodactyl\/yolks:java_21": "ghcr.io\/pterodactyl\/yolks:java_21", - "ghcr.io\/pterodactyl\/yolks:java_17": "ghcr.io\/pterodactyl\/yolks:java_17", - "ghcr.io\/pterodactyl\/yolks:java_16": "ghcr.io\/pterodactyl\/yolks:java_16" + "Java 25": "ghcr.io/ptero-eggs/yolks:java_25", + "Java 22": "ghcr.io/ptero-eggs/yolks:java_22", + "Java 21": "ghcr.io/ptero-eggs/yolks:java_21", + "Java 17": "ghcr.io/ptero-eggs/yolks:java_17", + "Java 16": "ghcr.io/ptero-eggs/yolks:java_16", + "Java 11": "ghcr.io/ptero-eggs/yolks:java_11", + "Java 8": "ghcr.io/ptero-eggs/yolks:java_8" }, "file_denylist": [], - "startup": "java -Xms128M -XX:MaxRAMPercentage=95.0 -Dterminal.jline=false -Dterminal.ansi=true -DgeyserUdpPort={{GEYSER_PORT}} -jar {{SERVER_JARFILE}}", + "startup": "java -Xms128M -XX:MaxRAMPercentage=95.0 -Dterminal.jline=false -Dterminal.ansi=true -jar {{SERVER_JARFILE}}", "config": { - "files": "{\r\n \"server.properties\": {\r\n \"parser\": \"properties\",\r\n \"find\": {\r\n \"server-ip\": \"0.0.0.0\",\r\n \"server-port\": \"{{server.build.default.port}}\"\r\n }\r\n }\r\n}", - "startup": "{\r\n \"done\": \")! For help, type \",\r\n \"userInteraction\": [\r\n \"Go to eula.txt for more info.\"\r\n ]\r\n}", + "files": "{\r\n \"server.properties\": {\r\n \"parser\": \"properties\",\r\n \"find\": {\r\n \"server-ip\": \"0.0.0.0\",\r\n \"server-port\": \"{{env.JAVA_PORT}}\",\r\n \"query.port\": \"{{env.JAVA_PORT}}\"\r\n }\r\n },\r\n \"plugins/Geyser-Spigot/config.yml\": {\r\n \"parser\": \"yaml\",\r\n \"find\": {\r\n \"bedrock.address\": \"0.0.0.0\",\r\n \"bedrock.port\": \"{{env.GEYSER_PORT}}\",\r\n \"bedrock.clone-remote-port\": \"false\",\r\n \"java.auth-type\": \"floodgate\"\r\n }\r\n }\r\n}", + "startup": "{\"done\":\")! For help, type \"}", "logs": "{}", "stop": "stop" }, "scripts": { "installation": { - "script": "#!\/bin\/ash\r\n# Paper+GeyserMC+Floodgate Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\nPROJECT=paper\r\nif [ -n \"${DL_PATH}\" ]; then\r\necho -e \"Using supplied download url: ${DL_PATH}\"\r\nDOWNLOAD_URL=`eval echo $(echo ${DL_PATH} | sed -e 's\/{{\/${\/g' -e 's\/}}\/}\/g')`\r\nelse\r\nVER_EXISTS=`curl -s https:\/\/api.papermc.io\/v2\/projects\/${PROJECT} | jq -r --arg VERSION $MINECRAFT_VERSION '.versions[] | contains($VERSION)' | grep -m1 true`\r\nLATEST_VERSION=`curl -s https:\/\/api.papermc.io\/v2\/projects\/${PROJECT} | jq -r '.versions' | jq -r '.[-1]'`\r\nif [ \"${VER_EXISTS}\" == \"true\" ]; then\r\necho -e \"Version is valid. Using version ${MINECRAFT_VERSION}\"\r\nelse\r\necho -e \"Using the latest ${PROJECT} version\"\r\nMINECRAFT_VERSION=${LATEST_VERSION}\r\nfi\r\nBUILD_EXISTS=`curl -s https:\/\/api.papermc.io\/v2\/projects\/${PROJECT}\/versions\/${MINECRAFT_VERSION} | jq -r --arg BUILD ${BUILD_NUMBER} '.builds[] | tostring | contains($BUILD)' | grep -m1 true`\r\nLATEST_BUILD=`curl -s https:\/\/api.papermc.io\/v2\/projects\/${PROJECT}\/versions\/${MINECRAFT_VERSION} | jq -r '.builds' | jq -r '.[-1]'`\r\nif [ \"${BUILD_EXISTS}\" == \"true\" ]; then\r\necho -e \"Build is valid for version ${MINECRAFT_VERSION}. Using build ${BUILD_NUMBER}\"\r\nelse\r\necho -e \"Using the latest ${PROJECT} build for version ${MINECRAFT_VERSION}\"\r\nBUILD_NUMBER=${LATEST_BUILD}\r\nfi\r\nJAR_NAME=${PROJECT}-${MINECRAFT_VERSION}-${BUILD_NUMBER}.jar\r\necho \"Version being downloaded\"\r\necho -e \"MC Version: ${MINECRAFT_VERSION}\"\r\necho -e \"Build: ${BUILD_NUMBER}\"\r\necho -e \"JAR Name of Build: ${JAR_NAME}\"\r\nDOWNLOAD_URL=https:\/\/api.papermc.io\/v2\/projects\/${PROJECT}\/versions\/${MINECRAFT_VERSION}\/builds\/${BUILD_NUMBER}\/downloads\/${JAR_NAME}\r\nfi\r\ncd \/mnt\/server\r\necho -e \"Running curl -o ${SERVER_JARFILE} ${DOWNLOAD_URL}\"\r\nif [ -f ${SERVER_JARFILE} ]; then\r\nmv ${SERVER_JARFILE} ${SERVER_JARFILE}.old\r\nfi\r\ncurl -o ${SERVER_JARFILE} ${DOWNLOAD_URL}\r\nif [ ! -f server.properties ]; then\r\necho -e \"Downloading MC server.properties\"\r\ncurl -o server.properties https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/minecraft\/java\/server.properties\r\nfi\r\nmkdir plugins\r\necho -e \"Downloading Geyser\"\r\nGEYSER_HASH=`curl -L https:\/\/download.geysermc.org\/v2\/projects\/geyser\/versions\/latest\/builds\/latest | jq -r .downloads.spigot.sha256`\r\ncurl -o plugins\/geyser-spigot.jar -L https:\/\/download.geysermc.org\/v2\/projects\/geyser\/versions\/latest\/builds\/latest\/downloads\/spigot\r\necho \"${GEYSER_HASH} plugins\/geyser-spigot.jar\" | sha256sum -c\r\nRESULT=$?\r\nif [[ $RESULT -eq 0 ]]; then\r\necho \"Geyser SHA256 match\"\r\nelse\r\necho \"SHA256 does not match! Aborting...\"\r\nrm plugins\/geyser-spigot.jar\r\nexit 1\r\nfi\r\necho -e \"Downloading Floodgate\"\r\nFLOODGATE_HASH=`curl -L https:\/\/download.geysermc.org\/v2\/projects\/floodgate\/versions\/latest\/builds\/latest | jq -r .downloads.spigot.sha256`\r\ncurl -o plugins\/floodgate-spigot.jar -L https:\/\/download.geysermc.org\/v2\/projects\/floodgate\/versions\/latest\/builds\/latest\/downloads\/spigot\r\necho \"${FLOODGATE_HASH} plugins\/floodgate-spigot.jar\" | sha256sum -c\r\nRESULT=$?\r\nif [[ $RESULT -eq 0 ]]; then\r\necho \"Floodgate SHA256 match\"\r\nelse\r\necho \"SHA256 does not match! Aborting...\"\r\nrm plugins\/floodgate-spigot.jar\r\nexit 1\r\nfi\r\nmkdir -p plugins\/Geyser-Spigot\/\r\nif [[ ! -f \"plugins\/Geyser-Spigot\/config.yml\" ]]; then\r\necho -e \"Downloading default Geyser config\"\r\ncurl -o plugins\/Geyser-Spigot\/config.yml https:\/\/raw.githubusercontent.com\/GeyserMC\/Geyser\/master\/core\/src\/main\/resources\/config.yml\r\nsed -i 's\/: online\/: floodgate\/g' plugins\/Geyser-Spigot\/config.yml\r\nfi", - "container": "ghcr.io\/pterodactyl\/installers:alpine", + "script": "#!/bin/ash\r\n# Paper+GeyserMC+Floodgate Installation Script\r\n#\r\n# Server Files: /mnt/server\r\nPROJECT=paper\r\nUSER_AGENT=\"Pterodactyl (https://Pterodactyl.io)\"\r\n\r\nif [ -n \"${DL_PATH}\" ]; then\r\n\techo -e \"Using supplied download url: ${DL_PATH}\"\r\n\tDOWNLOAD_URL=`eval echo $(echo ${DL_PATH} | sed -e 's/{{/${/g' -e 's/}}/}/g')`\r\nelse\r\n\tVER_EXISTS=`curl --user-agent \"${USER_AGENT}\" -s https://fill.papermc.io/v3/projects/${PROJECT} | jq -r --arg VERSION \"${MINECRAFT_VERSION}\" '.versions | any(.[]; index($VERSION))' | grep -m1 true`\r\n\tLATEST_VERSION=`curl --user-agent \"${USER_AGENT}\" -s https://fill.papermc.io/v3/projects/${PROJECT} | jq -r '.versions | to_entries | .[0].value[0]'`\r\n\r\n\tif [ \"${VER_EXISTS}\" = \"true\" ]; then\r\n\t\techo -e \"Version is valid. Using version ${MINECRAFT_VERSION}\"\r\n\telse\r\n\t\techo -e \"Specified version not found. Defaulting to the latest ${PROJECT} version\"\r\n\t\tMINECRAFT_VERSION=${LATEST_VERSION}\r\n\tfi\r\n\r\n\tBUILD_EXISTS=`curl --user-agent \"${USER_AGENT}\" -s https://fill.papermc.io/v3/projects/${PROJECT}/versions/${MINECRAFT_VERSION} | jq -r --arg BUILD \"${BUILD_NUMBER}\" '.builds[] | tostring | contains($BUILD)' | grep -m1 true`\r\n\tLATEST_BUILD=`curl --user-agent \"${USER_AGENT}\" -s https://fill.papermc.io/v3/projects/${PROJECT}/versions/${MINECRAFT_VERSION} | jq -r '.builds | .[0]'`\r\n\r\n\tif [ \"${BUILD_EXISTS}\" = \"true\" ]; then\r\n\t\techo -e \"Build is valid for version ${MINECRAFT_VERSION}. Using build ${BUILD_NUMBER}\"\r\n\telse\r\n\t\techo -e \"Using the latest ${PROJECT} build for version ${MINECRAFT_VERSION}\"\r\n\t\tBUILD_NUMBER=${LATEST_BUILD}\r\n\tfi\r\n\r\n\techo \"Version being downloaded\"\r\n\techo -e \"Project: ${PROJECT}\"\r\n\techo -e \"MC Version: ${MINECRAFT_VERSION}\"\r\n\techo -e \"Build: ${BUILD_NUMBER}\"\r\n\tDOWNLOAD_URL=`curl --user-agent \"${USER_AGENT}\" -s https://fill.papermc.io/v3/projects/${PROJECT}/versions/${MINECRAFT_VERSION}/builds/${BUILD_NUMBER} | jq -r '.downloads.\"server:default\".url'`\r\nfi\r\n\r\ncd /mnt/server\r\n\r\necho -e \"Running curl --user-agent \\\"${USER_AGENT}\\\" -o ${SERVER_JARFILE} ${DOWNLOAD_URL}\"\r\n\r\nif [ -f ${SERVER_JARFILE} ]; then\r\n\tmv ${SERVER_JARFILE} ${SERVER_JARFILE}.old\r\nfi\r\n\r\ncurl --user-agent \"${USER_AGENT}\" -o ${SERVER_JARFILE} ${DOWNLOAD_URL}\r\n\r\nif [ ! -f server.properties ]; then\r\n\techo -e \"Downloading MC server.properties\"\r\n\tcurl --user-agent \"${USER_AGENT}\" -o server.properties https://raw.githubusercontent.com/pterodactyl/game-eggs/main/minecraft/java/server.properties\r\nfi\r\n\r\n\r\nmkdir -p plugins\r\necho -e \"Downloading Geyser\"\r\nGEYSER_HASH=`curl -L -s https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest | jq -r .downloads.spigot.sha256`\r\ncurl -o plugins/geyser-spigot.jar -L https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/spigot\r\necho \"${GEYSER_HASH} plugins/geyser-spigot.jar\" | sha256sum -c\r\nRESULT=$?\r\nif [ \"${RESULT}\" -ne 0 ]; then\r\n\techo \"SHA256 does not match! Aborting...\"\r\n\trm -f plugins/geyser-spigot.jar\r\n\texit 1\r\nfi\r\necho \"Geyser SHA256 match\"\r\n\r\necho -e \"Downloading Floodgate\"\r\nFLOODGATE_HASH=`curl -L -s https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest | jq -r .downloads.spigot.sha256`\r\ncurl -o plugins/floodgate-spigot.jar -L https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot\r\necho \"${FLOODGATE_HASH} plugins/floodgate-spigot.jar\" | sha256sum -c\r\nRESULT=$?\r\nif [ \"${RESULT}\" -ne 0 ]; then\r\n\techo \"SHA256 does not match! Aborting...\"\r\n\trm -f plugins/floodgate-spigot.jar\r\n\texit 1\r\nfi\r\necho \"Floodgate SHA256 match\"\r\n\r\nmkdir -p plugins/Geyser-Spigot\r\nif [ -f \"plugins/Geyser-Spigot/config.yml\" ]; then\r\n\tsed -i 's/auth-type: online/auth-type: floodgate/g' plugins/Geyser-Spigot/config.yml\r\n\tsed -i 's/clone-remote-port: true/clone-remote-port: false/g' plugins/Geyser-Spigot/config.yml\r\nfi\r\n", + "container": "ghcr.io/ptero-eggs/installers:alpine", "entrypoint": "ash" } }, @@ -38,18 +44,18 @@ "env_variable": "MINECRAFT_VERSION", "default_value": "latest", "user_viewable": true, - "user_editable": false, + "user_editable": true, "rules": "nullable|string|max:20", "field_type": "text" }, { "name": "Server Jar File", - "description": "Server Jarfile, by default this is set to 'server.jar'.\r\nSet it to otherwise if you wish to have a different jarfile name.", + "description": "The name of the server jarfile to run the server with.", "env_variable": "SERVER_JARFILE", "default_value": "server.jar", "user_viewable": true, "user_editable": true, - "rules": "required|regex:\/^([\\w\\d._-]+)(\\.jar)$\/", + "rules": "required|regex:/^([\\w\\d._-]+)(\\.jar)$/", "field_type": "text" }, { @@ -68,17 +74,27 @@ "env_variable": "BUILD_NUMBER", "default_value": "latest", "user_viewable": true, - "user_editable": false, + "user_editable": true, "rules": "required|string|max:20", "field_type": "text" }, + { + "name": "Java Server Port", + "description": "TCP port for the Minecraft Java server (server.properties). Set this to match your server's primary allocation.", + "env_variable": "JAVA_PORT", + "default_value": "25565", + "user_viewable": true, + "user_editable": true, + "rules": "required|string|max:6", + "field_type": "text" + }, { "name": "Geyser Port", - "description": "The UDP port that Geyser will listen on\r\n\r\n\"-1\" will forcibly stop Geyser\r\n\"server\" will have Geyser listen on the same port as the TCP server", + "description": "UDP port Geyser listens on for Bedrock players (plugins/Geyser-Spigot/config.yml bedrock.port). Must match your Bedrock allocation when using a separate UDP port.", "env_variable": "GEYSER_PORT", "default_value": "19132", "user_viewable": true, - "user_editable": false, + "user_editable": true, "rules": "required|string|max:6", "field_type": "text" }