|
1
|
|
{
|
|
2
|
|
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
|
|
3
|
|
"meta": {
|
|
展开 58 行未改动
|
|
4
|
|
"version": "PTDL_v2",
|
|
5
|
|
"update_url": "https://eggs.pterodactyl.top/eggs/161/download/egg-ketting.json"
|
|
6
|
|
},
|
|
7
|
|
"exported_at": "2025-01-10T16:29:06+01:00",
|
|
8
|
|
"name": "Ketting",
|
|
9
|
|
"author": "joanfo360@gmail.com",
|
|
10
|
|
"description": "Magma successor for 1.20- with plugins and mods.",
|
|
11
|
|
"features": null,
|
|
12
|
|
"docker_images": {
|
|
13
|
|
"Java 17": "registry.cn-shanghai.aliyuncs.com/pterodactyl-images/yolks:java_17",
|
|
14
|
|
"Java 21": "registry.cn-shanghai.aliyuncs.com/pterodactyl-images/yolks:java_21",
|
|
15
|
|
"Java 25": "registry.cn-shanghai.aliyuncs.com/pterodactyl-images/yolks:java_25"
|
|
16
|
|
},
|
|
17
|
|
"file_denylist": [],
|
|
18
|
|
"startup": "java -Xms128M -XX:MaxRAMPercentage=95.0 -jar {{SERVER_JAR_FILE}} -minecraftVersion {{GAME_VERSION}}",
|
|
19
|
|
"config": {
|
|
20
|
|
"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}",
|
|
21
|
|
"startup": "{\r\n \"done\": \")! For help, type \"\r\n}",
|
|
22
|
|
"logs": "{}",
|
|
23
|
|
"stop": "stop"
|
|
24
|
|
},
|
|
25
|
|
"scripts": {
|
|
26
|
|
"installation": {
|
|
27
|
|
"script": "#!/bin/bash\r\n\r\n# Function to show the download progress bar\r\nprogress_bar() {\r\n # Set the length of the progress bar\r\n local bar_length=50\r\n local progress=$1\r\n local done=$((progress * bar_length / 100))\r\n local remaining=$((bar_length - done))\r\n local progress_bar=\"[\"\r\n\r\n for ((i=0; i<done; i++)); do\r\n progress_bar=\"#\"\r\n done\r\n for ((i=done; i<bar_length; i++)); do\r\n progress_bar=\" ${progress_bar}.\"\r\n done\r\n progress_bar=\"$progress_bar]\"\r\n\r\n printf \"\\r$progress_bar $progress%%\"\r\n}\r\n\r\nmkdir -p /mnt/server\r\ncd /mnt/server\r\n\r\n# Get release info and download links\r\nLATEST_JSON=$(curl --silent \"https://api.github.com/repos/kettingpowered/kettinglauncher/releases/latest\")\r\nRELEASES=$(curl --silent \"https://api.github.com/repos/kettingpowered/kettinglauncher/releases\")\r\n\r\n# Check if TAG_VERSION is set or if \"latest\" is specified\r\nif [ -z \"${TAG_VERSION}\" ] || [ \"${TAG_VERSION}\" == \"latest\" ]; then\r\n # Select the normal .jar file (exclude sources)\r\n DOWNLOAD_LINK=$(echo ${LATEST_JSON} | jq -r '.assets[] | select(.name | test(\".*\\\\.jar$\") and (test(\"-sources\") | not)) | .browser_download_url')\r\nelse\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${TAG_VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${TAG_VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n # Select the normal .jar file (exclude sources)\r\n DOWNLOAD_LINK=$(echo ${RELEASES} | jq -r --arg VERSION \"${TAG_VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[] | select(.name | test(\".*\\\\.jar$\") and (test(\"-sources\") | not)) | .browser_download_url')\r\n else\r\n # Default to latest release if version check fails\r\n DOWNLOAD_LINK=$(echo ${LATEST_JSON} | jq -r '.assets[] | select(.name | test(\".*\\\\.jar$\") and (test(\"-sources\") | not)) | .browser_download_url')\r\n fi\r\nfi\r\n\r\n# Check if the download link is valid\r\nif [ -n \"${DOWNLOAD_LINK}\" ]; then \r\n if curl --output /dev/null --silent --head --fail ${DOWNLOAD_LINK}; then\r\n # Get the file size for the progress bar\r\n FILE_SIZE=$(curl -sI ${DOWNLOAD_LINK} | grep -i Content-Length | awk '{print $2}' | tr -d '\\r')\r\n\r\n # Download the .jar file with progress bar\r\n echo \"Downloading server.jar...\"\r\n curl -sSL --progress-bar --output ${SERVER_JAR_FILE} ${DOWNLOAD_LINK} |\r\n while IFS= read -r line; do\r\n # Extract the download progress percentage\r\n PROGRESS=$(echo \"$line\" | grep -oP '\\d+(?=%)')\r\n if [ -n \"$PROGRESS\" ]; then\r\n progress_bar \"$PROGRESS\"\r\n fi\r\n done\r\n echo -e \"\\nInstall Complete\"\r\n else \r\n exit 2\r\n fi\r\nelse\r\n exit 1\r\nfi",
|
|
28
|
|
"container": "registry.cn-shanghai.aliyuncs.com/pterodactyl-images/installers:debian",
|
|
29
|
|
"entrypoint": "bash"
|
|
30
|
|
}
|
|
31
|
|
},
|
|
32
|
|
"variables": [
|
|
33
|
|
{
|
|
34
|
|
"name": "Server Jar File",
|
|
35
|
|
"description": "The jar executable of the server",
|
|
36
|
|
"env_variable": "SERVER_JAR_FILE",
|
|
37
|
|
"default_value": "server.jar",
|
|
38
|
|
"user_viewable": true,
|
|
39
|
|
"user_editable": true,
|
|
40
|
|
"rules": "required|string|regex:/^([\\w\\d._-]+)(\\.jar)$/",
|
|
41
|
|
"field_type": "text"
|
|
42
|
|
},
|
|
43
|
|
{
|
|
44
|
|
"name": "Game Version",
|
|
45
|
|
"description": "The version you want to run",
|
|
46
|
|
"env_variable": "GAME_VERSION",
|
|
47
|
|
"default_value": "1.20.1",
|
|
48
|
|
"user_viewable": false,
|
|
49
|
|
"user_editable": false,
|
|
50
|
|
"rules": "required|string|max:20",
|
|
51
|
|
"field_type": "text"
|
|
52
|
|
},
|
|
53
|
|
{
|
|
54
|
|
"name": "Tag Version",
|
|
55
|
|
"description": "Optional",
|
|
56
|
|
"env_variable": "TAG_VERSION",
|
|
57
|
|
"default_value": "latest",
|
|
58
|
|
"user_viewable": false,
|
|
59
|
|
"user_editable": false,
|
|
60
|
|
"rules": "required|string|max:20",
|
|
61
|
|
"field_type": "text"
|
|
62
|
|
}
|
|
63
|
|
]
|
|
64
|
|
}
|