2017-11-04 04:07:18 +00:00
{
"_comment" : "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO" ,
"meta" : {
2021-02-22 15:09:46 +00:00
"version" : "PTDL_v1" ,
"update_url" : null
2017-11-04 04:07:18 +00:00
} ,
2021-11-15 16:15:27 +00:00
"exported_at" : "2021-11-14T19:22:27+00:00" ,
2017-11-04 04:07:18 +00:00
"name" : "Forge Minecraft" ,
"author" : "support@pterodactyl.io" ,
"description" : "Minecraft Forge Server. Minecraft Forge is a modding API (Application Programming Interface), which makes it easier to create mods, and also make sure mods are compatible with each other." ,
2021-02-22 15:09:46 +00:00
"features" : [
2021-08-04 03:11:45 +00:00
"eula" ,
"java_version"
2021-02-22 15:09:46 +00:00
] ,
"images" : [
2021-07-17 17:02:00 +00:00
"ghcr.io\/pterodactyl\/yolks:java_8" ,
"ghcr.io\/pterodactyl\/yolks:java_11" ,
2021-11-15 16:15:27 +00:00
"ghcr.io\/pterodactyl\/yolks:java_16" ,
"ghcr.io\/pterodactyl\/yolks:java_17"
2021-02-22 15:09:46 +00:00
] ,
2021-03-15 16:07:30 +00:00
"file_denylist" : [ ] ,
2021-10-10 17:50:01 +00:00
"startup" : "java -Xms128M -Xmx{{SERVER_MEMORY}}M -Dterminal.jline=false -Dterminal.ansi=true $( [ ! -f unix_args.txt ] && printf %s \"-jar {{SERVER_JARFILE}}\" || printf %s \"@unix_args.txt\" )" ,
2017-11-04 04:07:18 +00:00
"config" : {
2021-10-23 20:11:45 +00:00
"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}" ,
2021-07-17 17:02:00 +00:00
"startup" : "{\r\n \"done\": \")! For help, type \"\r\n}" ,
2021-10-10 17:50:01 +00:00
"logs" : "{}" ,
2017-11-04 04:07:18 +00:00
"stop" : "stop"
} ,
"scripts" : {
"installation" : {
2021-10-10 17:50:01 +00:00
"script" : "#!\/bin\/bash\r\n# Forge Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y curl jq\r\n\r\nif [ ! -d \/mnt\/server ]; then\r\n mkdir \/mnt\/server\r\nfi\r\n\r\ncd \/mnt\/server\r\n\r\n# Remove spaces from the version number to avoid issues with curl\r\nFORGE_VERSION=\"$(echo \"$FORGE_VERSION\" | tr -d ' ')\"\r\nMC_VERSION=\"$(echo \"$MC_VERSION\" | tr -d ' ')\"\r\n\r\nif [ ! -z ${FORGE_VERSION} ]; then\r\n DOWNLOAD_LINK=https:\/\/maven.minecraftforge.net\/net\/minecraftforge\/forge\/${FORGE_VERSION}\/forge-${FORGE_VERSION}\r\n FORGE_JAR=forge-${FORGE_VERSION}*.jar\r\nelse\r\n JSON_DATA=$(curl -sSL https:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/promotions_slim.json)\r\n\r\n if [ \"${MC_VERSION}\" == \"latest\" ] || [ \"${MC_VERSION}\" == \"\" ] ; then\r\n echo -e \"getting latest version of forge.\"\r\n MC_VERSION=$(echo -e ${JSON_DATA} | jq -r '.promos | del(.\"latest-1.7.10\") | del(.\"1.7.10-latest-1.7.10\") | to_entries[] | .key | select(contains(\"recommended\")) | split(\"-\")[0]' | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n | tail -1)\r\n \tBUILD_TYPE=latest\r\n fi\r\n\r\n if [ \"${BUILD_TYPE}\" != \"recommended\" ] && [ \"${BUILD_TYPE}\" != \"latest\" ]; then\r\n BUILD_TYPE=recommended\r\n fi\r\n\r\n echo -e \"minecraft version: ${MC_VERSION}\"\r\n echo -e \"build type: ${BUILD_TYPE}\"\r\n\r\n ## some variables for getting versions and things\r\n\tFILE_SITE=https:\/\/maven.minecraftforge.net\/net\/minecraftforge\/forge\/\r\n VERSION_KEY=$(echo -e ${JSON_DATA} | jq -r --arg MC_VERSION \"${MC_VERSION}\" --arg BUILD_TYPE \"${BUILD_TYPE}\" '.promos | del(.\"latest-1.7.10\") | del(.\"1.7.10-latest-1.7.10\") | to_entries[] | .key | select(contains($MC_VERSION)) | select(contains($BUILD_TYPE))')\r\n\r\n ## locating the forge version\r\n if [ \"${VERSION_KEY}\" == \"\" ] && [ \"${BUILD_TYPE}\" == \"recommended\" ]; then\r\n echo -e \"dropping back to latest from recommended due to there not being a recommended version of forge for the mc version requested.\"\r\n VERSION_KEY=$(echo -e ${JSON_DATA} | jq -r --arg MC_VERSION \"${MC_VERSION}\" '.promos | del(.\"latest-1.7.10\") | del(.\"1.7.10-latest-1.7.10\") | to_entries[] | .key | select(contains($MC_VERSION)) | select(contains(\"recommended\"))')\r\n fi\r\n\r\n ## Error if the mc version set wasn't valid.\r\n if [ \"${VERSION_KEY}\" == \"\" ] || [ \"${VERSION_KEY}\" == \"null\" ]; then\r\n \techo -e \"The install failed because there is no valid version of forge for the version of minecraft selected.\"\r\n \texit 1\r\n fi\r\n\r\n FORGE_VERSION=$(echo -e ${JSON_DATA} | jq -r --arg VERSION_KEY \"$VERSION_KEY\" '.promos | .[$VERSION_KEY]')\r\n\r\n if [ \"${MC_VERSION}\" == \"1.7.10\" ] || [ \"${MC_VERSION}\" == \"1.8.9\" ]; then\r\n DOWNLOAD_LINK=${FILE_SITE}${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}\/forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}\r\n FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}.jar\r\n if [ \"${MC_VERSION}\" == \"1.7.10\" ]; then\r\n FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}-universal.jar\r\n fi\r\n else\r\n DOWNLOAD_LINK=${FILE_SITE}${MC_VERSION}-${FORGE_VERSION}\/forge-${MC_VERSION}-${FORGE_VERSION}\r\n FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}.jar\r\n fi\r\nfi\r\n\r\n\r\n#Adding .jar when not eding by SERVER_JARFILE\r\nif [[ ! $SERVER_JARFILE = *\\.jar ]]; then\r\n SERVER_JARFILE=\"$SERVER_JARFILE.jar\"\r\nfi\r\n\r\n#Downloading jars\r\necho -e \"Downloading forge version ${FORGE_VERSION}\"\r\necho -e \"Download link is ${DOWNLOAD_LINK}\"\r\n\r\nif [ ! -z \"${DOWNLOAD_LINK}\" ]; then\r\n if curl --output \/dev\/null --silent --head --fail ${DOWNLOAD_LINK}-installer.jar; then\r\n echo -e \"installer jar download link is valid.\"\r\n else\r\n echo -e \"link is invalid. Exiting now\"\r\n exit 2\r\n fi\r\nelse\r\n echo -e \" n o d o w n l o a d l
2020-05-24 16:23:53 +00:00
"container" : "openjdk:8-jdk-slim" ,
2019-07-26 15:07:32 +00:00
"entrypoint" : "bash"
2017-11-04 04:07:18 +00:00
}
} ,
"variables" : [
{
"name" : "Server Jar File" ,
2021-10-10 17:50:01 +00:00
"description" : "The name of the Jarfile to use when running Forge version below 1.17." ,
2017-11-04 04:07:18 +00:00
"env_variable" : "SERVER_JARFILE" ,
"default_value" : "server.jar" ,
2020-10-20 00:29:03 +00:00
"user_viewable" : true ,
"user_editable" : true ,
2017-11-04 04:07:18 +00:00
"rules" : "required|regex:\/^([\\w\\d._-]+)(\\.jar)$\/"
2018-07-01 01:52:32 +00:00
} ,
{
2020-12-07 01:55:41 +00:00
"name" : "Minecraft Version" ,
2020-05-24 16:23:53 +00:00
"description" : "The version of minecraft you want to install for.\r\n\r\nLeaving latest will install the latest recommended version." ,
2018-07-01 01:52:32 +00:00
"env_variable" : "MC_VERSION" ,
"default_value" : "latest" ,
2020-10-20 00:29:03 +00:00
"user_viewable" : true ,
"user_editable" : true ,
2020-05-24 16:23:53 +00:00
"rules" : "required|string|max:9"
} ,
{
"name" : "Build Type" ,
"description" : "The type of server jar to download from forge.\r\n\r\nValid types are \"recommended\" and \"latest\"." ,
"env_variable" : "BUILD_TYPE" ,
"default_value" : "recommended" ,
2020-10-20 00:29:03 +00:00
"user_viewable" : true ,
"user_editable" : true ,
2021-10-10 17:50:01 +00:00
"rules" : "required|string|in:recommended,latest"
2020-05-24 16:23:53 +00:00
} ,
{
"name" : "Forge Version" ,
"description" : "Gets an exact version.\r\n\r\nEx. 1.15.2-31.2.4\r\n\r\nOverrides MC_VERSION and BUILD_TYPE. If it fails to download the server files it will fail to install." ,
"env_variable" : "FORGE_VERSION" ,
"default_value" : "" ,
2020-10-20 00:29:03 +00:00
"user_viewable" : true ,
"user_editable" : true ,
2020-12-07 01:55:41 +00:00
"rules" : "nullable|string|max:20"
2017-11-04 04:07:18 +00:00
}
]
2021-08-04 03:11:45 +00:00
}