2020-03-09 10:57:01 +08:00
{
"_comment" : "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO" ,
"meta" : {
2021-01-25 02:09:42 +08:00
"version" : "PTDL_v1" ,
"update_url" : null
2020-03-09 10:57:01 +08:00
} ,
2022-05-22 12:21:59 +08:00
"exported_at" : "2022-05-22T00:20:47-04:00" ,
2020-03-09 10:57:01 +08:00
"name" : "Magma" ,
"author" : "support@pterodactyl.io" ,
"description" : "Magma is most powerful Forge server providing you with Forge mods and Bukkit Plugins using Spigot and Paper for Performance Optimization and Stability." ,
2021-11-26 08:14:52 +08:00
"features" : [
"eula" ,
2022-01-21 01:43:40 +08:00
"java_version" ,
"pid_limit"
2021-11-26 08:14:52 +08:00
] ,
2021-01-06 03:39:42 +08:00
"images" : [
2021-06-15 02:37:48 +08:00
"ghcr.io\/pterodactyl\/yolks:java_8" ,
"ghcr.io\/pterodactyl\/yolks:java_11" ,
2021-11-26 08:14:52 +08:00
"ghcr.io\/pterodactyl\/yolks:java_17"
2021-01-06 03:39:42 +08:00
] ,
2021-06-15 02:37:48 +08:00
"file_denylist" : [ ] ,
2020-03-09 10:57:01 +08:00
"startup" : "java -Xms128M -Xmx{{SERVER_MEMORY}}M -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 \"enable-query\": \"true\",\r\n \"server-port\": \"{{server.build.default.port}}\"\r\n }\r\n }\r\n}" ,
2021-12-17 19:18:38 +08:00
"startup" : "{\r\n \"done\": \")! For help, type \"\r\n}" ,
"logs" : "{}" ,
2020-03-09 10:57:01 +08:00
"stop" : "stop"
} ,
"scripts" : {
"installation" : {
2022-05-22 12:21:59 +08:00
"script" : "apt 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# get release info and download links\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.magmafoundation.org\/api\/v2\/1.16.5\/latest\")\r\n\r\nif [[ -z \"${TAG_VERSION}\" ]]; then\r\n TAG_VERSION = \"latest\"\r\nfi\r\n\r\nif [[ -z \"${MC_VERSION}\" ]] || [[ \"${MC_VERSION}\" == \"latest\" ]]; then\r\n echo -e \"Version not set. Defaulting to latest\"\r\n DOWNLOAD_LINK=$(echo ${LATEST_JSON} | jq -r .link | grep -i installer.jar)\r\nelif [[ $MC_VERSION =~ ^1\\.(16|17|18|19|20|21|22|23) ]]; then\r\n CUSTOM_JSON=$(curl --silent \"https:\/\/api.magmafoundation.org\/api\/v2\/${MC_VERSION}\/${TAG_VERSION}\")\r\n DOWNLOAD_LINK=$(echo ${CUSTOM_JSON} | jq -r .link | grep -i installer.jar)\r\nelif [[ \"${MC_VERSION}\" == \"1.12\" ]]; then\r\n CUSTOM_JSON=$(curl --silent \"https:\/\/api.magmafoundation.org\/api\/v2\/1.12\/${TAG_VERSION}\")\r\n DOWNLOAD_LINK=$(echo ${CUSTOM_JSON} | jq -r .link | grep -i server.jar)\r\nelse\r\n echo -e \"Specified ${MC_VERSION} version not found. Defaulting to latest\"\r\n DOWNLOAD_LINK=$(echo ${LATEST_JSON} | jq .link)\r\nfi\r\n\r\n# validate download link\r\nif [ ! -z \"${DOWNLOAD_LINK}\" ]; then\r\n echo -e \"Validating download link\"\r\n if curl --output \/dev\/null --silent --head --fail ${DOWNLOAD_LINK}; then\r\n echo -e \"link is valid. setting download link to ${DOWNLOAD_LINK}\"\r\n DOWNLOAD_LINK=${DOWNLOAD_LINK}\r\n else\r\n echo -e \"Download URL ${DOWNLOAD_LINK} is invalid. Terminating install.\"\r\n exit 2\r\n fi\r\nfi\r\n\r\nfunction downloadMagma {\r\n echo -e \"running: curl -sSL -o installer.jar ${DOWNLOAD_LINK}\"\r\n curl -sSL -o installer.jar -sSL ${DOWNLOAD_LINK}\r\n}\r\n\r\nif [[ $MC_VERSION =~ ^1\\.(16|17|18|19|20|21|22|23) ]] || [[ -z \"${MC_VERSION}\" ]] || [[ \"${MC_VERSION}\" == \"latest\" ]] ; then\r\n downloadMagma\r\n echo -e \"1.16.5 or newer version detected. Running installer\"\r\n java -jar installer.jar --installServer || { echo -e \"install failed\" exit 4; }\r\n mv forge-*.jar $SERVER_JARFILE\r\n echo -e \"Deleting installer.jar file.\\n\"\r\n rm -rf *installer.jar\r\nelse\r\n downloadMagma\r\n echo -e \"Older magma version detected. Skipping installer\"\r\n mv installer.jar $SERVER_JARFILE\r\nfi\r\n\r\necho -e \"Install Complete\"" ,
2021-12-17 19:18:38 +08:00
"container" : "openjdk:8-jdk-slim" ,
2021-01-25 02:09:42 +08:00
"entrypoint" : "bash"
2020-03-09 10:57:01 +08:00
}
} ,
"variables" : [
{
"name" : "Server Jar File" ,
"description" : "The name of the server jarfile to run the server with." ,
"env_variable" : "SERVER_JARFILE" ,
"default_value" : "server.jar" ,
2021-12-17 19:18:38 +08:00
"user_viewable" : true ,
2021-01-25 02:09:42 +08:00
"user_editable" : false ,
2020-03-09 10:57:01 +08:00
"rules" : "required|regex:\/^([\\w\\d._-]+)(\\.jar)$\/"
} ,
{
2021-01-25 19:08:43 +08:00
"name" : "Minecraft Version" ,
2021-12-17 19:18:38 +08:00
"description" : "Optional.\r\n\r\nSpecify the version to install, such as 1.16 or 1.12. Leave empty or set latest to install latest" ,
2021-01-25 19:08:43 +08:00
"env_variable" : "MC_VERSION" ,
2021-12-17 19:18:38 +08:00
"default_value" : "latest" ,
2021-01-25 02:09:42 +08:00
"user_viewable" : true ,
"user_editable" : true ,
"rules" : "nullable|string|max:20"
2021-12-17 19:18:38 +08:00
} ,
{
2022-05-22 12:21:59 +08:00
"name" : "Tag Version" ,
"description" : "Optional.\r\n\r\nSpecify the tag version to install. Leave empty or set latest to install latest" ,
"env_variable" : "TAG_VERSION" ,
"default_value" : "latest" ,
2021-12-17 19:18:38 +08:00
"user_viewable" : true ,
"user_editable" : true ,
2022-05-22 12:21:59 +08:00
"rules" : "nullable|string|max:20"
2020-03-09 10:57:01 +08:00
}
]
2022-05-22 12:21:59 +08:00
}