From d92e9e48a46e2b48bae0695bbd91b1b0ddb4e6ea Mon Sep 17 00:00:00 2001 From: Anitect Date: Tue, 2 Jun 2026 15:49:26 -0500 Subject: [PATCH 1/5] Update Paper eggs to API v3, ptero-eggs images, and latest plugins Co-authored-by: Cursor --- README.md | 17 ++++++++++------ egg-paper--floodgate.json | 34 +++++++++++++++++-------------- egg-paper--geyser--floodgate.json | 32 +++++++++++++++++------------ 3 files changed, 49 insertions(+), 34 deletions(-) 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..2f57d70 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\": \"{{server.build.default.port}}\",\r\n \"query.port\": \"{{server.build.default.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\n# Paper+Floodgate Installation Script\n#\n# Server Files: /mnt/server\nset -e\ncd /mnt/server\n\n# Shared Paper / GeyserMC helpers for egg install scripts.\r\n\r\nPROJECT=paper\r\nUSER_AGENT=\"Pterodactyl (https://Pterodactyl.io)\"\r\n\r\nrequire_jq() {\r\n\tif ! command -v jq >/dev/null 2>&1; then\r\n\t\techo \"jq is required but not available\"\r\n\t\treturn 1\r\n\tfi\r\n\tJQ=jq\r\n}\r\n\r\nresolve_paper_download() {\r\n\trequire_jq || return 1\r\n\r\n\tif [ -n \"${DL_PATH}\" ]; then\r\n\t\techo -e \"Using supplied download url: ${DL_PATH}\"\r\n\t\tDOWNLOAD_URL=$(eval echo \"$(echo \"${DL_PATH}\" | sed -e 's/{{/${/g' -e 's/}}/}/g')\")\r\n\t\treturn 0\r\n\tfi\r\n\r\n\tVER_EXISTS=$(\"${JQ}\" -r --arg VERSION \"${MINECRAFT_VERSION}\" '.versions | any(.[]; index($VERSION))' <<<\"$(curl --user-agent \"${USER_AGENT}\" -fsSL \"https://fill.papermc.io/v3/projects/${PROJECT}\")\" | grep -m1 true || true)\r\n\tLATEST_VERSION=$(\"${JQ}\" -r '.versions | to_entries | .[0].value[0]' <<<\"$(curl --user-agent \"${USER_AGENT}\" -fsSL \"https://fill.papermc.io/v3/projects/${PROJECT}\")\")\r\n\r\n\tif [ \"${VER_EXISTS}\" = \"true\" ]; then\r\n\t\techo -e \"Version is valid. Using version ${MINECRAFT_VERSION}\"\r\n\t\tRESOLVED_MC_VERSION=\"${MINECRAFT_VERSION}\"\r\n\telse\r\n\t\techo -e \"Specified version not found. Defaulting to the latest ${PROJECT} version\"\r\n\t\tRESOLVED_MC_VERSION=\"${LATEST_VERSION}\"\r\n\tfi\r\n\r\n\tVERSION_JSON=$(curl --user-agent \"${USER_AGENT}\" -fsSL \"https://fill.papermc.io/v3/projects/${PROJECT}/versions/${RESOLVED_MC_VERSION}\")\r\n\tLATEST_BUILD=$(\"${JQ}\" -r '.builds | .[0]' <<<\"${VERSION_JSON}\")\r\n\r\n\tif [ \"${BUILD_NUMBER}\" = \"latest\" ]; then\r\n\t\tRESOLVED_BUILD=\"${LATEST_BUILD}\"\r\n\t\techo -e \"Using the latest ${PROJECT} build for version ${RESOLVED_MC_VERSION}\"\r\n\telse\r\n\t\tBUILD_EXISTS=$(\"${JQ}\" -r --arg BUILD \"${BUILD_NUMBER}\" '.builds[] | tostring | contains($BUILD)' <<<\"${VERSION_JSON}\" | grep -m1 true || true)\r\n\t\tif [ \"${BUILD_EXISTS}\" = \"true\" ]; then\r\n\t\t\techo -e \"Build is valid for version ${RESOLVED_MC_VERSION}. Using build ${BUILD_NUMBER}\"\r\n\t\t\tRESOLVED_BUILD=\"${BUILD_NUMBER}\"\r\n\t\telse\r\n\t\t\techo -e \"Using the latest ${PROJECT} build for version ${RESOLVED_MC_VERSION}\"\r\n\t\t\tRESOLVED_BUILD=\"${LATEST_BUILD}\"\r\n\t\tfi\r\n\tfi\r\n\r\n\techo \"Version being downloaded\"\r\n\techo -e \"Project: ${PROJECT}\"\r\n\techo -e \"MC Version: ${RESOLVED_MC_VERSION}\"\r\n\techo -e \"Build: ${RESOLVED_BUILD}\"\r\n\r\n\tDOWNLOAD_URL=$(\"${JQ}\" -r '.downloads.\"server:default\".url' <<<\"$(curl --user-agent \"${USER_AGENT}\" -fsSL \"https://fill.papermc.io/v3/projects/${PROJECT}/versions/${RESOLVED_MC_VERSION}/builds/${RESOLVED_BUILD}\")\")\r\n}\r\n\r\ndownload_paper_jar() {\r\n\tresolve_paper_download || return 1\r\n\r\n\techo -e \"Running curl --user-agent \\\"${USER_AGENT}\\\" -o ${SERVER_JARFILE} ${DOWNLOAD_URL}\"\r\n\r\n\tif [ -f \"${SERVER_JARFILE}\" ]; then\r\n\t\tmv \"${SERVER_JARFILE}\" \"${SERVER_JARFILE}.old\"\r\n\tfi\r\n\r\n\tcurl --user-agent \"${USER_AGENT}\" -fsSL -o \"${SERVER_JARFILE}\" \"${DOWNLOAD_URL}\" || return 1\r\n}\r\n\r\ndownload_server_properties() {\r\n\tif [ ! -f server.properties ]; then\r\n\t\techo -e \"Downloading MC server.properties\"\r\n\t\tcurl --user-agent \"${USER_AGENT}\" -fsSL -o server.properties https://raw.githubusercontent.com/pterodactyl/game-eggs/main/minecraft/java/server.properties\r\n\tfi\r\n}\r\n\r\ndownload_geyser_plugin() {\r\n\trequire_jq || return 1\r\n\tmkdir -p plugins\r\n\r\n\tGEYSER_META=$(curl -fsSL https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest)\r\n\tGEYSER_HASH=$(\"${JQ}\" -r '.downloads.spigot.sha256' <<<\"${GEYSER_META}\")\r\n\r\n\techo -e \"Downloading Geyser\"\r\n\tcurl -fsSL -o plugins/geyser-spigot.jar https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/spigot\r\n\techo \"${GEYSER_HASH} plugins/geyser-spigot.jar\" | sha256sum -c || {\r\n\t\techo \"Geyser SHA256 does not match! Aborting...\"\r\n\t\trm -f plugins/geyser-spigot.jar\r\n\t\treturn 1\r\n\t}\r\n\techo \"Geyser SHA256 match\"\r\n}\r\n\r\ndownload_floodgate_plugin() {\r\n\trequire_jq || return 1\r\n\tmkdir -p plugins\r\n\r\n\tFLOODGATE_META=$(curl -fsSL https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest)\r\n\tFLOODGATE_HASH=$(\"${JQ}\" -r '.downloads.spigot.sha256' <<<\"${FLOODGATE_META}\")\r\n\r\n\techo -e \"Downloading Floodgate\"\r\n\tcurl -fsSL -o plugins/floodgate-spigot.jar https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot\r\n\techo \"${FLOODGATE_HASH} plugins/floodgate-spigot.jar\" | sha256sum -c || {\r\n\t\techo \"Floodgate SHA256 does not match! Aborting...\"\r\n\t\trm -f plugins/floodgate-spigot.jar\r\n\t\treturn 1\r\n\t}\r\n\techo \"Floodgate SHA256 match\"\r\n}\r\n\r\ninstall_geyser_config() {\r\n\tmkdir -p plugins/Geyser-Spigot/\r\n\tif [ ! -f \"plugins/Geyser-Spigot/config.yml\" ]; then\r\n\t\techo -e \"Downloading default Geyser config\"\r\n\t\tcurl -fsSL -o plugins/Geyser-Spigot/config.yml https://raw.githubusercontent.com/GeyserMC/Geyser/master/core/src/main/resources/config.yml\r\n\t\tsed -i 's/: online/: floodgate/g' plugins/Geyser-Spigot/config.yml\r\n\tfi\r\n}\r\n\ndownload_paper_jar || exit 1\ndownload_server_properties\nmkdir -p plugins\ndownload_floodgate_plugin || exit 1\necho \"Installation complete\"\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,9 @@ "env_variable": "BUILD_NUMBER", "default_value": "latest", "user_viewable": true, - "user_editable": false, + "user_editable": true, "rules": "required|string|max:20", "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..f9d296d 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}}", "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\": \"{{server.build.default.port}}\",\r\n \"query.port\": \"{{server.build.default.port}}\"\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\n# Paper+GeyserMC+Floodgate Installation Script\n#\n# Server Files: /mnt/server\nset -e\ncd /mnt/server\n\n# Shared Paper / GeyserMC helpers for egg install scripts.\r\n\r\nPROJECT=paper\r\nUSER_AGENT=\"Pterodactyl (https://Pterodactyl.io)\"\r\n\r\nrequire_jq() {\r\n\tif ! command -v jq >/dev/null 2>&1; then\r\n\t\techo \"jq is required but not available\"\r\n\t\treturn 1\r\n\tfi\r\n\tJQ=jq\r\n}\r\n\r\nresolve_paper_download() {\r\n\trequire_jq || return 1\r\n\r\n\tif [ -n \"${DL_PATH}\" ]; then\r\n\t\techo -e \"Using supplied download url: ${DL_PATH}\"\r\n\t\tDOWNLOAD_URL=$(eval echo \"$(echo \"${DL_PATH}\" | sed -e 's/{{/${/g' -e 's/}}/}/g')\")\r\n\t\treturn 0\r\n\tfi\r\n\r\n\tVER_EXISTS=$(\"${JQ}\" -r --arg VERSION \"${MINECRAFT_VERSION}\" '.versions | any(.[]; index($VERSION))' <<<\"$(curl --user-agent \"${USER_AGENT}\" -fsSL \"https://fill.papermc.io/v3/projects/${PROJECT}\")\" | grep -m1 true || true)\r\n\tLATEST_VERSION=$(\"${JQ}\" -r '.versions | to_entries | .[0].value[0]' <<<\"$(curl --user-agent \"${USER_AGENT}\" -fsSL \"https://fill.papermc.io/v3/projects/${PROJECT}\")\")\r\n\r\n\tif [ \"${VER_EXISTS}\" = \"true\" ]; then\r\n\t\techo -e \"Version is valid. Using version ${MINECRAFT_VERSION}\"\r\n\t\tRESOLVED_MC_VERSION=\"${MINECRAFT_VERSION}\"\r\n\telse\r\n\t\techo -e \"Specified version not found. Defaulting to the latest ${PROJECT} version\"\r\n\t\tRESOLVED_MC_VERSION=\"${LATEST_VERSION}\"\r\n\tfi\r\n\r\n\tVERSION_JSON=$(curl --user-agent \"${USER_AGENT}\" -fsSL \"https://fill.papermc.io/v3/projects/${PROJECT}/versions/${RESOLVED_MC_VERSION}\")\r\n\tLATEST_BUILD=$(\"${JQ}\" -r '.builds | .[0]' <<<\"${VERSION_JSON}\")\r\n\r\n\tif [ \"${BUILD_NUMBER}\" = \"latest\" ]; then\r\n\t\tRESOLVED_BUILD=\"${LATEST_BUILD}\"\r\n\t\techo -e \"Using the latest ${PROJECT} build for version ${RESOLVED_MC_VERSION}\"\r\n\telse\r\n\t\tBUILD_EXISTS=$(\"${JQ}\" -r --arg BUILD \"${BUILD_NUMBER}\" '.builds[] | tostring | contains($BUILD)' <<<\"${VERSION_JSON}\" | grep -m1 true || true)\r\n\t\tif [ \"${BUILD_EXISTS}\" = \"true\" ]; then\r\n\t\t\techo -e \"Build is valid for version ${RESOLVED_MC_VERSION}. Using build ${BUILD_NUMBER}\"\r\n\t\t\tRESOLVED_BUILD=\"${BUILD_NUMBER}\"\r\n\t\telse\r\n\t\t\techo -e \"Using the latest ${PROJECT} build for version ${RESOLVED_MC_VERSION}\"\r\n\t\t\tRESOLVED_BUILD=\"${LATEST_BUILD}\"\r\n\t\tfi\r\n\tfi\r\n\r\n\techo \"Version being downloaded\"\r\n\techo -e \"Project: ${PROJECT}\"\r\n\techo -e \"MC Version: ${RESOLVED_MC_VERSION}\"\r\n\techo -e \"Build: ${RESOLVED_BUILD}\"\r\n\r\n\tDOWNLOAD_URL=$(\"${JQ}\" -r '.downloads.\"server:default\".url' <<<\"$(curl --user-agent \"${USER_AGENT}\" -fsSL \"https://fill.papermc.io/v3/projects/${PROJECT}/versions/${RESOLVED_MC_VERSION}/builds/${RESOLVED_BUILD}\")\")\r\n}\r\n\r\ndownload_paper_jar() {\r\n\tresolve_paper_download || return 1\r\n\r\n\techo -e \"Running curl --user-agent \\\"${USER_AGENT}\\\" -o ${SERVER_JARFILE} ${DOWNLOAD_URL}\"\r\n\r\n\tif [ -f \"${SERVER_JARFILE}\" ]; then\r\n\t\tmv \"${SERVER_JARFILE}\" \"${SERVER_JARFILE}.old\"\r\n\tfi\r\n\r\n\tcurl --user-agent \"${USER_AGENT}\" -fsSL -o \"${SERVER_JARFILE}\" \"${DOWNLOAD_URL}\" || return 1\r\n}\r\n\r\ndownload_server_properties() {\r\n\tif [ ! -f server.properties ]; then\r\n\t\techo -e \"Downloading MC server.properties\"\r\n\t\tcurl --user-agent \"${USER_AGENT}\" -fsSL -o server.properties https://raw.githubusercontent.com/pterodactyl/game-eggs/main/minecraft/java/server.properties\r\n\tfi\r\n}\r\n\r\ndownload_geyser_plugin() {\r\n\trequire_jq || return 1\r\n\tmkdir -p plugins\r\n\r\n\tGEYSER_META=$(curl -fsSL https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest)\r\n\tGEYSER_HASH=$(\"${JQ}\" -r '.downloads.spigot.sha256' <<<\"${GEYSER_META}\")\r\n\r\n\techo -e \"Downloading Geyser\"\r\n\tcurl -fsSL -o plugins/geyser-spigot.jar https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/spigot\r\n\techo \"${GEYSER_HASH} plugins/geyser-spigot.jar\" | sha256sum -c || {\r\n\t\techo \"Geyser SHA256 does not match! Aborting...\"\r\n\t\trm -f plugins/geyser-spigot.jar\r\n\t\treturn 1\r\n\t}\r\n\techo \"Geyser SHA256 match\"\r\n}\r\n\r\ndownload_floodgate_plugin() {\r\n\trequire_jq || return 1\r\n\tmkdir -p plugins\r\n\r\n\tFLOODGATE_META=$(curl -fsSL https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest)\r\n\tFLOODGATE_HASH=$(\"${JQ}\" -r '.downloads.spigot.sha256' <<<\"${FLOODGATE_META}\")\r\n\r\n\techo -e \"Downloading Floodgate\"\r\n\tcurl -fsSL -o plugins/floodgate-spigot.jar https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot\r\n\techo \"${FLOODGATE_HASH} plugins/floodgate-spigot.jar\" | sha256sum -c || {\r\n\t\techo \"Floodgate SHA256 does not match! Aborting...\"\r\n\t\trm -f plugins/floodgate-spigot.jar\r\n\t\treturn 1\r\n\t}\r\n\techo \"Floodgate SHA256 match\"\r\n}\r\n\r\ninstall_geyser_config() {\r\n\tmkdir -p plugins/Geyser-Spigot/\r\n\tif [ ! -f \"plugins/Geyser-Spigot/config.yml\" ]; then\r\n\t\techo -e \"Downloading default Geyser config\"\r\n\t\tcurl -fsSL -o plugins/Geyser-Spigot/config.yml https://raw.githubusercontent.com/GeyserMC/Geyser/master/core/src/main/resources/config.yml\r\n\t\tsed -i 's/: online/: floodgate/g' plugins/Geyser-Spigot/config.yml\r\n\tfi\r\n}\r\n\ndownload_paper_jar || exit 1\ndownload_server_properties\nmkdir -p plugins\ndownload_geyser_plugin || exit 1\ndownload_floodgate_plugin || exit 1\ninstall_geyser_config\necho \"Installation complete\"\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,7 +74,7 @@ "env_variable": "BUILD_NUMBER", "default_value": "latest", "user_viewable": true, - "user_editable": false, + "user_editable": true, "rules": "required|string|max:20", "field_type": "text" }, @@ -78,7 +84,7 @@ "env_variable": "GEYSER_PORT", "default_value": "19132", "user_viewable": true, - "user_editable": false, + "user_editable": true, "rules": "required|string|max:6", "field_type": "text" } From 09bd79019e13e2b701957895bdd36f0c0ca2d72b Mon Sep 17 00:00:00 2001 From: Anitect Date: Wed, 3 Jun 2026 09:57:06 -0500 Subject: [PATCH 2/5] Fix Paper egg install scripts for Alpine ash (replace bash <<< with curl|jq pipes) Co-authored-by: Cursor --- egg-paper--floodgate.json | 2 +- egg-paper--geyser--floodgate.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/egg-paper--floodgate.json b/egg-paper--floodgate.json index 2f57d70..b6fb819 100644 --- a/egg-paper--floodgate.json +++ b/egg-paper--floodgate.json @@ -32,7 +32,7 @@ }, "scripts": { "installation": { - "script": "#!/bin/ash\n# Paper+Floodgate Installation Script\n#\n# Server Files: /mnt/server\nset -e\ncd /mnt/server\n\n# Shared Paper / GeyserMC helpers for egg install scripts.\r\n\r\nPROJECT=paper\r\nUSER_AGENT=\"Pterodactyl (https://Pterodactyl.io)\"\r\n\r\nrequire_jq() {\r\n\tif ! command -v jq >/dev/null 2>&1; then\r\n\t\techo \"jq is required but not available\"\r\n\t\treturn 1\r\n\tfi\r\n\tJQ=jq\r\n}\r\n\r\nresolve_paper_download() {\r\n\trequire_jq || return 1\r\n\r\n\tif [ -n \"${DL_PATH}\" ]; then\r\n\t\techo -e \"Using supplied download url: ${DL_PATH}\"\r\n\t\tDOWNLOAD_URL=$(eval echo \"$(echo \"${DL_PATH}\" | sed -e 's/{{/${/g' -e 's/}}/}/g')\")\r\n\t\treturn 0\r\n\tfi\r\n\r\n\tVER_EXISTS=$(\"${JQ}\" -r --arg VERSION \"${MINECRAFT_VERSION}\" '.versions | any(.[]; index($VERSION))' <<<\"$(curl --user-agent \"${USER_AGENT}\" -fsSL \"https://fill.papermc.io/v3/projects/${PROJECT}\")\" | grep -m1 true || true)\r\n\tLATEST_VERSION=$(\"${JQ}\" -r '.versions | to_entries | .[0].value[0]' <<<\"$(curl --user-agent \"${USER_AGENT}\" -fsSL \"https://fill.papermc.io/v3/projects/${PROJECT}\")\")\r\n\r\n\tif [ \"${VER_EXISTS}\" = \"true\" ]; then\r\n\t\techo -e \"Version is valid. Using version ${MINECRAFT_VERSION}\"\r\n\t\tRESOLVED_MC_VERSION=\"${MINECRAFT_VERSION}\"\r\n\telse\r\n\t\techo -e \"Specified version not found. Defaulting to the latest ${PROJECT} version\"\r\n\t\tRESOLVED_MC_VERSION=\"${LATEST_VERSION}\"\r\n\tfi\r\n\r\n\tVERSION_JSON=$(curl --user-agent \"${USER_AGENT}\" -fsSL \"https://fill.papermc.io/v3/projects/${PROJECT}/versions/${RESOLVED_MC_VERSION}\")\r\n\tLATEST_BUILD=$(\"${JQ}\" -r '.builds | .[0]' <<<\"${VERSION_JSON}\")\r\n\r\n\tif [ \"${BUILD_NUMBER}\" = \"latest\" ]; then\r\n\t\tRESOLVED_BUILD=\"${LATEST_BUILD}\"\r\n\t\techo -e \"Using the latest ${PROJECT} build for version ${RESOLVED_MC_VERSION}\"\r\n\telse\r\n\t\tBUILD_EXISTS=$(\"${JQ}\" -r --arg BUILD \"${BUILD_NUMBER}\" '.builds[] | tostring | contains($BUILD)' <<<\"${VERSION_JSON}\" | grep -m1 true || true)\r\n\t\tif [ \"${BUILD_EXISTS}\" = \"true\" ]; then\r\n\t\t\techo -e \"Build is valid for version ${RESOLVED_MC_VERSION}. Using build ${BUILD_NUMBER}\"\r\n\t\t\tRESOLVED_BUILD=\"${BUILD_NUMBER}\"\r\n\t\telse\r\n\t\t\techo -e \"Using the latest ${PROJECT} build for version ${RESOLVED_MC_VERSION}\"\r\n\t\t\tRESOLVED_BUILD=\"${LATEST_BUILD}\"\r\n\t\tfi\r\n\tfi\r\n\r\n\techo \"Version being downloaded\"\r\n\techo -e \"Project: ${PROJECT}\"\r\n\techo -e \"MC Version: ${RESOLVED_MC_VERSION}\"\r\n\techo -e \"Build: ${RESOLVED_BUILD}\"\r\n\r\n\tDOWNLOAD_URL=$(\"${JQ}\" -r '.downloads.\"server:default\".url' <<<\"$(curl --user-agent \"${USER_AGENT}\" -fsSL \"https://fill.papermc.io/v3/projects/${PROJECT}/versions/${RESOLVED_MC_VERSION}/builds/${RESOLVED_BUILD}\")\")\r\n}\r\n\r\ndownload_paper_jar() {\r\n\tresolve_paper_download || return 1\r\n\r\n\techo -e \"Running curl --user-agent \\\"${USER_AGENT}\\\" -o ${SERVER_JARFILE} ${DOWNLOAD_URL}\"\r\n\r\n\tif [ -f \"${SERVER_JARFILE}\" ]; then\r\n\t\tmv \"${SERVER_JARFILE}\" \"${SERVER_JARFILE}.old\"\r\n\tfi\r\n\r\n\tcurl --user-agent \"${USER_AGENT}\" -fsSL -o \"${SERVER_JARFILE}\" \"${DOWNLOAD_URL}\" || return 1\r\n}\r\n\r\ndownload_server_properties() {\r\n\tif [ ! -f server.properties ]; then\r\n\t\techo -e \"Downloading MC server.properties\"\r\n\t\tcurl --user-agent \"${USER_AGENT}\" -fsSL -o server.properties https://raw.githubusercontent.com/pterodactyl/game-eggs/main/minecraft/java/server.properties\r\n\tfi\r\n}\r\n\r\ndownload_geyser_plugin() {\r\n\trequire_jq || return 1\r\n\tmkdir -p plugins\r\n\r\n\tGEYSER_META=$(curl -fsSL https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest)\r\n\tGEYSER_HASH=$(\"${JQ}\" -r '.downloads.spigot.sha256' <<<\"${GEYSER_META}\")\r\n\r\n\techo -e \"Downloading Geyser\"\r\n\tcurl -fsSL -o plugins/geyser-spigot.jar https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/spigot\r\n\techo \"${GEYSER_HASH} plugins/geyser-spigot.jar\" | sha256sum -c || {\r\n\t\techo \"Geyser SHA256 does not match! Aborting...\"\r\n\t\trm -f plugins/geyser-spigot.jar\r\n\t\treturn 1\r\n\t}\r\n\techo \"Geyser SHA256 match\"\r\n}\r\n\r\ndownload_floodgate_plugin() {\r\n\trequire_jq || return 1\r\n\tmkdir -p plugins\r\n\r\n\tFLOODGATE_META=$(curl -fsSL https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest)\r\n\tFLOODGATE_HASH=$(\"${JQ}\" -r '.downloads.spigot.sha256' <<<\"${FLOODGATE_META}\")\r\n\r\n\techo -e \"Downloading Floodgate\"\r\n\tcurl -fsSL -o plugins/floodgate-spigot.jar https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot\r\n\techo \"${FLOODGATE_HASH} plugins/floodgate-spigot.jar\" | sha256sum -c || {\r\n\t\techo \"Floodgate SHA256 does not match! Aborting...\"\r\n\t\trm -f plugins/floodgate-spigot.jar\r\n\t\treturn 1\r\n\t}\r\n\techo \"Floodgate SHA256 match\"\r\n}\r\n\r\ninstall_geyser_config() {\r\n\tmkdir -p plugins/Geyser-Spigot/\r\n\tif [ ! -f \"plugins/Geyser-Spigot/config.yml\" ]; then\r\n\t\techo -e \"Downloading default Geyser config\"\r\n\t\tcurl -fsSL -o plugins/Geyser-Spigot/config.yml https://raw.githubusercontent.com/GeyserMC/Geyser/master/core/src/main/resources/config.yml\r\n\t\tsed -i 's/: online/: floodgate/g' plugins/Geyser-Spigot/config.yml\r\n\tfi\r\n}\r\n\ndownload_paper_jar || exit 1\ndownload_server_properties\nmkdir -p plugins\ndownload_floodgate_plugin || exit 1\necho \"Installation complete\"\n", + "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" } diff --git a/egg-paper--geyser--floodgate.json b/egg-paper--geyser--floodgate.json index f9d296d..3f13ce4 100644 --- a/egg-paper--geyser--floodgate.json +++ b/egg-paper--geyser--floodgate.json @@ -32,7 +32,7 @@ }, "scripts": { "installation": { - "script": "#!/bin/ash\n# Paper+GeyserMC+Floodgate Installation Script\n#\n# Server Files: /mnt/server\nset -e\ncd /mnt/server\n\n# Shared Paper / GeyserMC helpers for egg install scripts.\r\n\r\nPROJECT=paper\r\nUSER_AGENT=\"Pterodactyl (https://Pterodactyl.io)\"\r\n\r\nrequire_jq() {\r\n\tif ! command -v jq >/dev/null 2>&1; then\r\n\t\techo \"jq is required but not available\"\r\n\t\treturn 1\r\n\tfi\r\n\tJQ=jq\r\n}\r\n\r\nresolve_paper_download() {\r\n\trequire_jq || return 1\r\n\r\n\tif [ -n \"${DL_PATH}\" ]; then\r\n\t\techo -e \"Using supplied download url: ${DL_PATH}\"\r\n\t\tDOWNLOAD_URL=$(eval echo \"$(echo \"${DL_PATH}\" | sed -e 's/{{/${/g' -e 's/}}/}/g')\")\r\n\t\treturn 0\r\n\tfi\r\n\r\n\tVER_EXISTS=$(\"${JQ}\" -r --arg VERSION \"${MINECRAFT_VERSION}\" '.versions | any(.[]; index($VERSION))' <<<\"$(curl --user-agent \"${USER_AGENT}\" -fsSL \"https://fill.papermc.io/v3/projects/${PROJECT}\")\" | grep -m1 true || true)\r\n\tLATEST_VERSION=$(\"${JQ}\" -r '.versions | to_entries | .[0].value[0]' <<<\"$(curl --user-agent \"${USER_AGENT}\" -fsSL \"https://fill.papermc.io/v3/projects/${PROJECT}\")\")\r\n\r\n\tif [ \"${VER_EXISTS}\" = \"true\" ]; then\r\n\t\techo -e \"Version is valid. Using version ${MINECRAFT_VERSION}\"\r\n\t\tRESOLVED_MC_VERSION=\"${MINECRAFT_VERSION}\"\r\n\telse\r\n\t\techo -e \"Specified version not found. Defaulting to the latest ${PROJECT} version\"\r\n\t\tRESOLVED_MC_VERSION=\"${LATEST_VERSION}\"\r\n\tfi\r\n\r\n\tVERSION_JSON=$(curl --user-agent \"${USER_AGENT}\" -fsSL \"https://fill.papermc.io/v3/projects/${PROJECT}/versions/${RESOLVED_MC_VERSION}\")\r\n\tLATEST_BUILD=$(\"${JQ}\" -r '.builds | .[0]' <<<\"${VERSION_JSON}\")\r\n\r\n\tif [ \"${BUILD_NUMBER}\" = \"latest\" ]; then\r\n\t\tRESOLVED_BUILD=\"${LATEST_BUILD}\"\r\n\t\techo -e \"Using the latest ${PROJECT} build for version ${RESOLVED_MC_VERSION}\"\r\n\telse\r\n\t\tBUILD_EXISTS=$(\"${JQ}\" -r --arg BUILD \"${BUILD_NUMBER}\" '.builds[] | tostring | contains($BUILD)' <<<\"${VERSION_JSON}\" | grep -m1 true || true)\r\n\t\tif [ \"${BUILD_EXISTS}\" = \"true\" ]; then\r\n\t\t\techo -e \"Build is valid for version ${RESOLVED_MC_VERSION}. Using build ${BUILD_NUMBER}\"\r\n\t\t\tRESOLVED_BUILD=\"${BUILD_NUMBER}\"\r\n\t\telse\r\n\t\t\techo -e \"Using the latest ${PROJECT} build for version ${RESOLVED_MC_VERSION}\"\r\n\t\t\tRESOLVED_BUILD=\"${LATEST_BUILD}\"\r\n\t\tfi\r\n\tfi\r\n\r\n\techo \"Version being downloaded\"\r\n\techo -e \"Project: ${PROJECT}\"\r\n\techo -e \"MC Version: ${RESOLVED_MC_VERSION}\"\r\n\techo -e \"Build: ${RESOLVED_BUILD}\"\r\n\r\n\tDOWNLOAD_URL=$(\"${JQ}\" -r '.downloads.\"server:default\".url' <<<\"$(curl --user-agent \"${USER_AGENT}\" -fsSL \"https://fill.papermc.io/v3/projects/${PROJECT}/versions/${RESOLVED_MC_VERSION}/builds/${RESOLVED_BUILD}\")\")\r\n}\r\n\r\ndownload_paper_jar() {\r\n\tresolve_paper_download || return 1\r\n\r\n\techo -e \"Running curl --user-agent \\\"${USER_AGENT}\\\" -o ${SERVER_JARFILE} ${DOWNLOAD_URL}\"\r\n\r\n\tif [ -f \"${SERVER_JARFILE}\" ]; then\r\n\t\tmv \"${SERVER_JARFILE}\" \"${SERVER_JARFILE}.old\"\r\n\tfi\r\n\r\n\tcurl --user-agent \"${USER_AGENT}\" -fsSL -o \"${SERVER_JARFILE}\" \"${DOWNLOAD_URL}\" || return 1\r\n}\r\n\r\ndownload_server_properties() {\r\n\tif [ ! -f server.properties ]; then\r\n\t\techo -e \"Downloading MC server.properties\"\r\n\t\tcurl --user-agent \"${USER_AGENT}\" -fsSL -o server.properties https://raw.githubusercontent.com/pterodactyl/game-eggs/main/minecraft/java/server.properties\r\n\tfi\r\n}\r\n\r\ndownload_geyser_plugin() {\r\n\trequire_jq || return 1\r\n\tmkdir -p plugins\r\n\r\n\tGEYSER_META=$(curl -fsSL https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest)\r\n\tGEYSER_HASH=$(\"${JQ}\" -r '.downloads.spigot.sha256' <<<\"${GEYSER_META}\")\r\n\r\n\techo -e \"Downloading Geyser\"\r\n\tcurl -fsSL -o plugins/geyser-spigot.jar https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/spigot\r\n\techo \"${GEYSER_HASH} plugins/geyser-spigot.jar\" | sha256sum -c || {\r\n\t\techo \"Geyser SHA256 does not match! Aborting...\"\r\n\t\trm -f plugins/geyser-spigot.jar\r\n\t\treturn 1\r\n\t}\r\n\techo \"Geyser SHA256 match\"\r\n}\r\n\r\ndownload_floodgate_plugin() {\r\n\trequire_jq || return 1\r\n\tmkdir -p plugins\r\n\r\n\tFLOODGATE_META=$(curl -fsSL https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest)\r\n\tFLOODGATE_HASH=$(\"${JQ}\" -r '.downloads.spigot.sha256' <<<\"${FLOODGATE_META}\")\r\n\r\n\techo -e \"Downloading Floodgate\"\r\n\tcurl -fsSL -o plugins/floodgate-spigot.jar https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot\r\n\techo \"${FLOODGATE_HASH} plugins/floodgate-spigot.jar\" | sha256sum -c || {\r\n\t\techo \"Floodgate SHA256 does not match! Aborting...\"\r\n\t\trm -f plugins/floodgate-spigot.jar\r\n\t\treturn 1\r\n\t}\r\n\techo \"Floodgate SHA256 match\"\r\n}\r\n\r\ninstall_geyser_config() {\r\n\tmkdir -p plugins/Geyser-Spigot/\r\n\tif [ ! -f \"plugins/Geyser-Spigot/config.yml\" ]; then\r\n\t\techo -e \"Downloading default Geyser config\"\r\n\t\tcurl -fsSL -o plugins/Geyser-Spigot/config.yml https://raw.githubusercontent.com/GeyserMC/Geyser/master/core/src/main/resources/config.yml\r\n\t\tsed -i 's/: online/: floodgate/g' plugins/Geyser-Spigot/config.yml\r\n\tfi\r\n}\r\n\ndownload_paper_jar || exit 1\ndownload_server_properties\nmkdir -p plugins\ndownload_geyser_plugin || exit 1\ndownload_floodgate_plugin || exit 1\ninstall_geyser_config\necho \"Installation complete\"\n", + "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\techo -e \"Downloading default Geyser config\"\r\n\tcurl -o plugins/Geyser-Spigot/config.yml https://raw.githubusercontent.com/GeyserMC/Geyser/master/core/src/main/resources/config.yml\r\n\tsed -i 's/: online/: floodgate/g' plugins/Geyser-Spigot/config.yml\r\nfi\r\n", "container": "ghcr.io/ptero-eggs/installers:alpine", "entrypoint": "ash" } From d299b6805d9d08e728d6fd257f25b21fdd541efe Mon Sep 17 00:00:00 2001 From: Anitect Date: Wed, 3 Jun 2026 10:31:13 -0500 Subject: [PATCH 3/5] Fix Geyser port and floodgate config for Pterodactyl panel. Use config.files with Geyser v7 keys (java.auth-type), {{env.*}} placeholders for file parsing, JAVA_PORT variable (SERVER_PORT is reserved), and remove ineffective -DgeyserUdpPort startup flag. Co-authored-by: Cursor --- egg-paper--floodgate.json | 12 +++++++++++- egg-paper--geyser--floodgate.json | 18 ++++++++++++++---- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/egg-paper--floodgate.json b/egg-paper--floodgate.json index b6fb819..ebc0a0c 100644 --- a/egg-paper--floodgate.json +++ b/egg-paper--floodgate.json @@ -25,7 +25,7 @@ "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 \"query.port\": \"{{server.build.default.port}}\"\r\n }\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" @@ -77,6 +77,16 @@ "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" } ] } diff --git a/egg-paper--geyser--floodgate.json b/egg-paper--geyser--floodgate.json index 3f13ce4..f1aed42 100644 --- a/egg-paper--geyser--floodgate.json +++ b/egg-paper--geyser--floodgate.json @@ -23,16 +23,16 @@ "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 \"query.port\": \"{{server.build.default.port}}\"\r\n }\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\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\techo -e \"Downloading default Geyser config\"\r\n\tcurl -o plugins/Geyser-Spigot/config.yml https://raw.githubusercontent.com/GeyserMC/Geyser/master/core/src/main/resources/config.yml\r\n\tsed -i 's/: online/: floodgate/g' plugins/Geyser-Spigot/config.yml\r\nfi\r\n", + "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" } @@ -78,9 +78,19 @@ "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, From fa9037abbfb4f314baa6f14117b577dc497b1743 Mon Sep 17 00:00:00 2001 From: Anitect Date: Wed, 3 Jun 2026 10:48:19 -0500 Subject: [PATCH 4/5] Match Geyser and Floodgate plugin builds to Paper MC version on install. Query the GeyserMC Downloads API for builds whose changelogs reference the resolved MINECRAFT_VERSION, with a tiered fallback to latest when unmatched. Co-authored-by: Cursor --- README.md | 2 +- egg-paper--floodgate.json | 2 +- egg-paper--geyser--floodgate.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 97e1005..381bc7a 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ This repo contains the eggs for GeyserMC and the docker images for auto update s ## 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. +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. Geyser and Floodgate builds are resolved from the [GeyserMC Downloads API](https://geysermc.org/wiki/api/) using the selected **Minecraft Version** (changelog matching, with a fallback to `latest` when no build is found). ### Eggs diff --git a/egg-paper--floodgate.json b/egg-paper--floodgate.json index ebc0a0c..be6187e 100644 --- a/egg-paper--floodgate.json +++ b/egg-paper--floodgate.json @@ -32,7 +32,7 @@ }, "scripts": { "installation": { - "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", + "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\nresolve_geysermc_build() {\r\r\n\tGEYSERMC_PROJECT=\"$1\"\r\r\n\tPLATFORM=\"$2\"\r\r\n\tOUT_JAR=\"$3\"\r\r\n\tMC_VER=\"${MINECRAFT_VERSION}\"\r\r\n\tMC_MAJOR=`echo \"${MC_VER}\" | sed -n 's/^\\([0-9][0-9]*\\.[0-9][0-9]*\\).*/\\1/p'`\r\r\n\tMC_ESC=`echo \"${MC_VER}\" | sed 's/\\./\\\\./g'`\r\r\n\tMAJOR_ESC=`echo \"${MC_MAJOR}\" | sed 's/\\./\\\\./g'`\r\r\n\tPLUGIN_VER=\"\"\r\r\n\tBUILD_NUM=\"\"\r\r\n\tFOUND=0\r\r\n\tfor TIER in 1 2; do\r\r\n\t\t[ \"${FOUND}\" -eq 1 ] && break\r\r\n\t\tfor PLUGIN_VER in `curl -sL \"https://download.geysermc.org/v2/projects/${GEYSERMC_PROJECT}\" | jq -r '.versions | reverse | .[]'`; do\r\r\n\t\t\t[ \"${FOUND}\" -eq 1 ] && break\r\r\n\t\t\tBUILDS_JSON=`curl -sL \"https://download.geysermc.org/v2/projects/${GEYSERMC_PROJECT}/versions/${PLUGIN_VER}/builds\"`\r\r\n\t\t\tfor BUILD_NUM in `echo \"${BUILDS_JSON}\" | jq -r '.builds | reverse | .[].build'`; do\r\r\n\t\t\t\tHIT=`echo \"${BUILDS_JSON}\" | jq -r --argjson BN \"${BUILD_NUM}\" --arg MC \"${MC_VER}\" --arg MAJOR \"${MC_MAJOR}\" --arg MC_ESC \"${MC_ESC}\" --arg MAJOR_ESC \"${MAJOR_ESC}\" --argjson TIER \"${TIER}\" '\r\r\n\t\t\t\t\tdef tier1:\r\r\n\t\t\t\t\t (.summary | test(\"\\\\b\" + $MC_ESC + \"\\\\b\"))\r\r\n\t\t\t\t\t or (.summary | test(\"Initial \" + $MC + \"\\\\b\"; \"i\"))\r\r\n\t\t\t\t\t or ((.summary + \" \" + .message) | test(\"Java Edition \" + $MC + \"\\\\b\"; \"i\"));\r\r\n\t\t\t\t\tdef tier2:\r\r\n\t\t\t\t\t ($MAJOR != \"\") and (\r\r\n\t\t\t\t\t (.summary | test(\"Start on \" + $MAJOR_ESC + \"\\\\b\"; \"i\"))\r\r\n\t\t\t\t\t or ((.summary + \" \" + .message) | test($MAJOR_ESC + \" support\"; \"i\"))\r\r\n\t\t\t\t\t or ((.summary + \" \" + .message) | test(\"Paper \" + $MAJOR_ESC + \"\\\\b\"; \"i\"))\r\r\n\t\t\t\t\t );\r\r\n\t\t\t\t\t.builds[] | select(.build == $BN) | .changes[] |\r\r\n\t\t\t\t\tselect(if $TIER == 1 then tier1 else tier2 end) | .summary' | head -n 1`\r\r\n\t\t\t\tif [ -n \"${HIT}\" ]; then\r\r\n\t\t\t\t\tFOUND=1\r\r\n\t\t\t\t\techo -e \"Matched ${GEYSERMC_PROJECT} for MC ${MC_VER}: version ${PLUGIN_VER} build ${BUILD_NUM} (${HIT})\"\r\r\n\t\t\t\t\tbreak\r\r\n\t\t\t\tfi\r\r\n\t\t\tdone\r\r\n\t\tdone\r\r\n\tdone\r\r\n\tif [ \"${FOUND}\" -eq 0 ]; then\r\r\n\t\tPLUGIN_VER=latest\r\r\n\t\tBUILD_NUM=latest\r\r\n\t\techo -e \"No ${GEYSERMC_PROJECT} build matched MC ${MC_VER}; using latest\"\r\r\n\tfi\r\r\n\tFILE_HASH=`curl -sL \"https://download.geysermc.org/v2/projects/${GEYSERMC_PROJECT}/versions/${PLUGIN_VER}/builds/${BUILD_NUM}\" | jq -r \".downloads.${PLATFORM}.sha256\"`\r\r\n\tcurl -o \"${OUT_JAR}\" -L \"https://download.geysermc.org/v2/projects/${GEYSERMC_PROJECT}/versions/${PLUGIN_VER}/builds/${BUILD_NUM}/downloads/${PLATFORM}\"\r\r\n\techo \"${FILE_HASH} ${OUT_JAR}\" | sha256sum -c\r\r\n\tRESULT=$?\r\r\n\tif [ \"${RESULT}\" -ne 0 ]; then\r\r\n\t\techo \"SHA256 does not match! Aborting...\"\r\r\n\t\trm -f \"${OUT_JAR}\"\r\r\n\t\texit 1\r\r\n\tfi\r\r\n\techo \"${GEYSERMC_PROJECT} SHA256 match\"\r\r\n}\r\n\r\nmkdir -p plugins\r\necho -e \"Downloading Floodgate\"\r\nresolve_geysermc_build floodgate spigot plugins/floodgate-spigot.jar\r\n", "container": "ghcr.io/ptero-eggs/installers:alpine", "entrypoint": "ash" } diff --git a/egg-paper--geyser--floodgate.json b/egg-paper--geyser--floodgate.json index f1aed42..ed1ea74 100644 --- a/egg-paper--geyser--floodgate.json +++ b/egg-paper--geyser--floodgate.json @@ -32,7 +32,7 @@ }, "scripts": { "installation": { - "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", + "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\nresolve_geysermc_build() {\r\r\n\tGEYSERMC_PROJECT=\"$1\"\r\r\n\tPLATFORM=\"$2\"\r\r\n\tOUT_JAR=\"$3\"\r\r\n\tMC_VER=\"${MINECRAFT_VERSION}\"\r\r\n\tMC_MAJOR=`echo \"${MC_VER}\" | sed -n 's/^\\([0-9][0-9]*\\.[0-9][0-9]*\\).*/\\1/p'`\r\r\n\tMC_ESC=`echo \"${MC_VER}\" | sed 's/\\./\\\\./g'`\r\r\n\tMAJOR_ESC=`echo \"${MC_MAJOR}\" | sed 's/\\./\\\\./g'`\r\r\n\tPLUGIN_VER=\"\"\r\r\n\tBUILD_NUM=\"\"\r\r\n\tFOUND=0\r\r\n\tfor TIER in 1 2; do\r\r\n\t\t[ \"${FOUND}\" -eq 1 ] && break\r\r\n\t\tfor PLUGIN_VER in `curl -sL \"https://download.geysermc.org/v2/projects/${GEYSERMC_PROJECT}\" | jq -r '.versions | reverse | .[]'`; do\r\r\n\t\t\t[ \"${FOUND}\" -eq 1 ] && break\r\r\n\t\t\tBUILDS_JSON=`curl -sL \"https://download.geysermc.org/v2/projects/${GEYSERMC_PROJECT}/versions/${PLUGIN_VER}/builds\"`\r\r\n\t\t\tfor BUILD_NUM in `echo \"${BUILDS_JSON}\" | jq -r '.builds | reverse | .[].build'`; do\r\r\n\t\t\t\tHIT=`echo \"${BUILDS_JSON}\" | jq -r --argjson BN \"${BUILD_NUM}\" --arg MC \"${MC_VER}\" --arg MAJOR \"${MC_MAJOR}\" --arg MC_ESC \"${MC_ESC}\" --arg MAJOR_ESC \"${MAJOR_ESC}\" --argjson TIER \"${TIER}\" '\r\r\n\t\t\t\t\tdef tier1:\r\r\n\t\t\t\t\t (.summary | test(\"\\\\b\" + $MC_ESC + \"\\\\b\"))\r\r\n\t\t\t\t\t or (.summary | test(\"Initial \" + $MC + \"\\\\b\"; \"i\"))\r\r\n\t\t\t\t\t or ((.summary + \" \" + .message) | test(\"Java Edition \" + $MC + \"\\\\b\"; \"i\"));\r\r\n\t\t\t\t\tdef tier2:\r\r\n\t\t\t\t\t ($MAJOR != \"\") and (\r\r\n\t\t\t\t\t (.summary | test(\"Start on \" + $MAJOR_ESC + \"\\\\b\"; \"i\"))\r\r\n\t\t\t\t\t or ((.summary + \" \" + .message) | test($MAJOR_ESC + \" support\"; \"i\"))\r\r\n\t\t\t\t\t or ((.summary + \" \" + .message) | test(\"Paper \" + $MAJOR_ESC + \"\\\\b\"; \"i\"))\r\r\n\t\t\t\t\t );\r\r\n\t\t\t\t\t.builds[] | select(.build == $BN) | .changes[] |\r\r\n\t\t\t\t\tselect(if $TIER == 1 then tier1 else tier2 end) | .summary' | head -n 1`\r\r\n\t\t\t\tif [ -n \"${HIT}\" ]; then\r\r\n\t\t\t\t\tFOUND=1\r\r\n\t\t\t\t\techo -e \"Matched ${GEYSERMC_PROJECT} for MC ${MC_VER}: version ${PLUGIN_VER} build ${BUILD_NUM} (${HIT})\"\r\r\n\t\t\t\t\tbreak\r\r\n\t\t\t\tfi\r\r\n\t\t\tdone\r\r\n\t\tdone\r\r\n\tdone\r\r\n\tif [ \"${FOUND}\" -eq 0 ]; then\r\r\n\t\tPLUGIN_VER=latest\r\r\n\t\tBUILD_NUM=latest\r\r\n\t\techo -e \"No ${GEYSERMC_PROJECT} build matched MC ${MC_VER}; using latest\"\r\r\n\tfi\r\r\n\tFILE_HASH=`curl -sL \"https://download.geysermc.org/v2/projects/${GEYSERMC_PROJECT}/versions/${PLUGIN_VER}/builds/${BUILD_NUM}\" | jq -r \".downloads.${PLATFORM}.sha256\"`\r\r\n\tcurl -o \"${OUT_JAR}\" -L \"https://download.geysermc.org/v2/projects/${GEYSERMC_PROJECT}/versions/${PLUGIN_VER}/builds/${BUILD_NUM}/downloads/${PLATFORM}\"\r\r\n\techo \"${FILE_HASH} ${OUT_JAR}\" | sha256sum -c\r\r\n\tRESULT=$?\r\r\n\tif [ \"${RESULT}\" -ne 0 ]; then\r\r\n\t\techo \"SHA256 does not match! Aborting...\"\r\r\n\t\trm -f \"${OUT_JAR}\"\r\r\n\t\texit 1\r\r\n\tfi\r\r\n\techo \"${GEYSERMC_PROJECT} SHA256 match\"\r\r\n}\r\n\r\nmkdir -p plugins\r\necho -e \"Downloading Geyser\"\r\nresolve_geysermc_build geyser spigot plugins/geyser-spigot.jar\r\n\r\necho -e \"Downloading Floodgate\"\r\nresolve_geysermc_build floodgate spigot plugins/floodgate-spigot.jar\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" } From b5318150867f32bd1e218f935f8e0f5b34fd3f37 Mon Sep 17 00:00:00 2001 From: Anitect Date: Wed, 3 Jun 2026 10:55:18 -0500 Subject: [PATCH 5/5] Revert "Match Geyser and Floodgate plugin builds to Paper MC version on install." This reverts commit fa9037abbfb4f314baa6f14117b577dc497b1743. --- README.md | 2 +- egg-paper--floodgate.json | 2 +- egg-paper--geyser--floodgate.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 381bc7a..97e1005 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ This repo contains the eggs for GeyserMC and the docker images for auto update s ## 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. Geyser and Floodgate builds are resolved from the [GeyserMC Downloads API](https://geysermc.org/wiki/api/) using the selected **Minecraft Version** (changelog matching, with a fallback to `latest` when no build is found). +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 diff --git a/egg-paper--floodgate.json b/egg-paper--floodgate.json index be6187e..ebc0a0c 100644 --- a/egg-paper--floodgate.json +++ b/egg-paper--floodgate.json @@ -32,7 +32,7 @@ }, "scripts": { "installation": { - "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\nresolve_geysermc_build() {\r\r\n\tGEYSERMC_PROJECT=\"$1\"\r\r\n\tPLATFORM=\"$2\"\r\r\n\tOUT_JAR=\"$3\"\r\r\n\tMC_VER=\"${MINECRAFT_VERSION}\"\r\r\n\tMC_MAJOR=`echo \"${MC_VER}\" | sed -n 's/^\\([0-9][0-9]*\\.[0-9][0-9]*\\).*/\\1/p'`\r\r\n\tMC_ESC=`echo \"${MC_VER}\" | sed 's/\\./\\\\./g'`\r\r\n\tMAJOR_ESC=`echo \"${MC_MAJOR}\" | sed 's/\\./\\\\./g'`\r\r\n\tPLUGIN_VER=\"\"\r\r\n\tBUILD_NUM=\"\"\r\r\n\tFOUND=0\r\r\n\tfor TIER in 1 2; do\r\r\n\t\t[ \"${FOUND}\" -eq 1 ] && break\r\r\n\t\tfor PLUGIN_VER in `curl -sL \"https://download.geysermc.org/v2/projects/${GEYSERMC_PROJECT}\" | jq -r '.versions | reverse | .[]'`; do\r\r\n\t\t\t[ \"${FOUND}\" -eq 1 ] && break\r\r\n\t\t\tBUILDS_JSON=`curl -sL \"https://download.geysermc.org/v2/projects/${GEYSERMC_PROJECT}/versions/${PLUGIN_VER}/builds\"`\r\r\n\t\t\tfor BUILD_NUM in `echo \"${BUILDS_JSON}\" | jq -r '.builds | reverse | .[].build'`; do\r\r\n\t\t\t\tHIT=`echo \"${BUILDS_JSON}\" | jq -r --argjson BN \"${BUILD_NUM}\" --arg MC \"${MC_VER}\" --arg MAJOR \"${MC_MAJOR}\" --arg MC_ESC \"${MC_ESC}\" --arg MAJOR_ESC \"${MAJOR_ESC}\" --argjson TIER \"${TIER}\" '\r\r\n\t\t\t\t\tdef tier1:\r\r\n\t\t\t\t\t (.summary | test(\"\\\\b\" + $MC_ESC + \"\\\\b\"))\r\r\n\t\t\t\t\t or (.summary | test(\"Initial \" + $MC + \"\\\\b\"; \"i\"))\r\r\n\t\t\t\t\t or ((.summary + \" \" + .message) | test(\"Java Edition \" + $MC + \"\\\\b\"; \"i\"));\r\r\n\t\t\t\t\tdef tier2:\r\r\n\t\t\t\t\t ($MAJOR != \"\") and (\r\r\n\t\t\t\t\t (.summary | test(\"Start on \" + $MAJOR_ESC + \"\\\\b\"; \"i\"))\r\r\n\t\t\t\t\t or ((.summary + \" \" + .message) | test($MAJOR_ESC + \" support\"; \"i\"))\r\r\n\t\t\t\t\t or ((.summary + \" \" + .message) | test(\"Paper \" + $MAJOR_ESC + \"\\\\b\"; \"i\"))\r\r\n\t\t\t\t\t );\r\r\n\t\t\t\t\t.builds[] | select(.build == $BN) | .changes[] |\r\r\n\t\t\t\t\tselect(if $TIER == 1 then tier1 else tier2 end) | .summary' | head -n 1`\r\r\n\t\t\t\tif [ -n \"${HIT}\" ]; then\r\r\n\t\t\t\t\tFOUND=1\r\r\n\t\t\t\t\techo -e \"Matched ${GEYSERMC_PROJECT} for MC ${MC_VER}: version ${PLUGIN_VER} build ${BUILD_NUM} (${HIT})\"\r\r\n\t\t\t\t\tbreak\r\r\n\t\t\t\tfi\r\r\n\t\t\tdone\r\r\n\t\tdone\r\r\n\tdone\r\r\n\tif [ \"${FOUND}\" -eq 0 ]; then\r\r\n\t\tPLUGIN_VER=latest\r\r\n\t\tBUILD_NUM=latest\r\r\n\t\techo -e \"No ${GEYSERMC_PROJECT} build matched MC ${MC_VER}; using latest\"\r\r\n\tfi\r\r\n\tFILE_HASH=`curl -sL \"https://download.geysermc.org/v2/projects/${GEYSERMC_PROJECT}/versions/${PLUGIN_VER}/builds/${BUILD_NUM}\" | jq -r \".downloads.${PLATFORM}.sha256\"`\r\r\n\tcurl -o \"${OUT_JAR}\" -L \"https://download.geysermc.org/v2/projects/${GEYSERMC_PROJECT}/versions/${PLUGIN_VER}/builds/${BUILD_NUM}/downloads/${PLATFORM}\"\r\r\n\techo \"${FILE_HASH} ${OUT_JAR}\" | sha256sum -c\r\r\n\tRESULT=$?\r\r\n\tif [ \"${RESULT}\" -ne 0 ]; then\r\r\n\t\techo \"SHA256 does not match! Aborting...\"\r\r\n\t\trm -f \"${OUT_JAR}\"\r\r\n\t\texit 1\r\r\n\tfi\r\r\n\techo \"${GEYSERMC_PROJECT} SHA256 match\"\r\r\n}\r\n\r\nmkdir -p plugins\r\necho -e \"Downloading Floodgate\"\r\nresolve_geysermc_build floodgate spigot plugins/floodgate-spigot.jar\r\n", + "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" } diff --git a/egg-paper--geyser--floodgate.json b/egg-paper--geyser--floodgate.json index ed1ea74..f1aed42 100644 --- a/egg-paper--geyser--floodgate.json +++ b/egg-paper--geyser--floodgate.json @@ -32,7 +32,7 @@ }, "scripts": { "installation": { - "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\nresolve_geysermc_build() {\r\r\n\tGEYSERMC_PROJECT=\"$1\"\r\r\n\tPLATFORM=\"$2\"\r\r\n\tOUT_JAR=\"$3\"\r\r\n\tMC_VER=\"${MINECRAFT_VERSION}\"\r\r\n\tMC_MAJOR=`echo \"${MC_VER}\" | sed -n 's/^\\([0-9][0-9]*\\.[0-9][0-9]*\\).*/\\1/p'`\r\r\n\tMC_ESC=`echo \"${MC_VER}\" | sed 's/\\./\\\\./g'`\r\r\n\tMAJOR_ESC=`echo \"${MC_MAJOR}\" | sed 's/\\./\\\\./g'`\r\r\n\tPLUGIN_VER=\"\"\r\r\n\tBUILD_NUM=\"\"\r\r\n\tFOUND=0\r\r\n\tfor TIER in 1 2; do\r\r\n\t\t[ \"${FOUND}\" -eq 1 ] && break\r\r\n\t\tfor PLUGIN_VER in `curl -sL \"https://download.geysermc.org/v2/projects/${GEYSERMC_PROJECT}\" | jq -r '.versions | reverse | .[]'`; do\r\r\n\t\t\t[ \"${FOUND}\" -eq 1 ] && break\r\r\n\t\t\tBUILDS_JSON=`curl -sL \"https://download.geysermc.org/v2/projects/${GEYSERMC_PROJECT}/versions/${PLUGIN_VER}/builds\"`\r\r\n\t\t\tfor BUILD_NUM in `echo \"${BUILDS_JSON}\" | jq -r '.builds | reverse | .[].build'`; do\r\r\n\t\t\t\tHIT=`echo \"${BUILDS_JSON}\" | jq -r --argjson BN \"${BUILD_NUM}\" --arg MC \"${MC_VER}\" --arg MAJOR \"${MC_MAJOR}\" --arg MC_ESC \"${MC_ESC}\" --arg MAJOR_ESC \"${MAJOR_ESC}\" --argjson TIER \"${TIER}\" '\r\r\n\t\t\t\t\tdef tier1:\r\r\n\t\t\t\t\t (.summary | test(\"\\\\b\" + $MC_ESC + \"\\\\b\"))\r\r\n\t\t\t\t\t or (.summary | test(\"Initial \" + $MC + \"\\\\b\"; \"i\"))\r\r\n\t\t\t\t\t or ((.summary + \" \" + .message) | test(\"Java Edition \" + $MC + \"\\\\b\"; \"i\"));\r\r\n\t\t\t\t\tdef tier2:\r\r\n\t\t\t\t\t ($MAJOR != \"\") and (\r\r\n\t\t\t\t\t (.summary | test(\"Start on \" + $MAJOR_ESC + \"\\\\b\"; \"i\"))\r\r\n\t\t\t\t\t or ((.summary + \" \" + .message) | test($MAJOR_ESC + \" support\"; \"i\"))\r\r\n\t\t\t\t\t or ((.summary + \" \" + .message) | test(\"Paper \" + $MAJOR_ESC + \"\\\\b\"; \"i\"))\r\r\n\t\t\t\t\t );\r\r\n\t\t\t\t\t.builds[] | select(.build == $BN) | .changes[] |\r\r\n\t\t\t\t\tselect(if $TIER == 1 then tier1 else tier2 end) | .summary' | head -n 1`\r\r\n\t\t\t\tif [ -n \"${HIT}\" ]; then\r\r\n\t\t\t\t\tFOUND=1\r\r\n\t\t\t\t\techo -e \"Matched ${GEYSERMC_PROJECT} for MC ${MC_VER}: version ${PLUGIN_VER} build ${BUILD_NUM} (${HIT})\"\r\r\n\t\t\t\t\tbreak\r\r\n\t\t\t\tfi\r\r\n\t\t\tdone\r\r\n\t\tdone\r\r\n\tdone\r\r\n\tif [ \"${FOUND}\" -eq 0 ]; then\r\r\n\t\tPLUGIN_VER=latest\r\r\n\t\tBUILD_NUM=latest\r\r\n\t\techo -e \"No ${GEYSERMC_PROJECT} build matched MC ${MC_VER}; using latest\"\r\r\n\tfi\r\r\n\tFILE_HASH=`curl -sL \"https://download.geysermc.org/v2/projects/${GEYSERMC_PROJECT}/versions/${PLUGIN_VER}/builds/${BUILD_NUM}\" | jq -r \".downloads.${PLATFORM}.sha256\"`\r\r\n\tcurl -o \"${OUT_JAR}\" -L \"https://download.geysermc.org/v2/projects/${GEYSERMC_PROJECT}/versions/${PLUGIN_VER}/builds/${BUILD_NUM}/downloads/${PLATFORM}\"\r\r\n\techo \"${FILE_HASH} ${OUT_JAR}\" | sha256sum -c\r\r\n\tRESULT=$?\r\r\n\tif [ \"${RESULT}\" -ne 0 ]; then\r\r\n\t\techo \"SHA256 does not match! Aborting...\"\r\r\n\t\trm -f \"${OUT_JAR}\"\r\r\n\t\texit 1\r\r\n\tfi\r\r\n\techo \"${GEYSERMC_PROJECT} SHA256 match\"\r\r\n}\r\n\r\nmkdir -p plugins\r\necho -e \"Downloading Geyser\"\r\nresolve_geysermc_build geyser spigot plugins/geyser-spigot.jar\r\n\r\necho -e \"Downloading Floodgate\"\r\nresolve_geysermc_build floodgate spigot plugins/floodgate-spigot.jar\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", + "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" }