{"meta":{"slug":"pterodactyl-ketting","name":"Pterodactyl Ketting","category":"java","source":"pelican","owner":"pelican-eggs","repo":"minecraft","branch":"main","path":"java/ketting/egg-pterodactyl-ketting.json","rawUrl":"https://raw.githubusercontent.com/pelican-eggs/minecraft/main/java/ketting/egg-pterodactyl-ketting.json","indexedAt":1792246788483},"egg":{"_comment":"DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO","meta":{"version":"PTDL_v2","update_url":"https://raw.githubusercontent.com/pelican-eggs/minecraft/refs/heads/main/java/ketting/egg-pterodactyl-ketting.json"},"exported_at":"2025-01-10T16:29:06+01:00","name":"Ketting","author":"joanfo360@gmail.com","description":"Magma successor for 1.20- with plugins and mods.","features":null,"docker_images":{"Java 17":"ghcr.io/pelican-eggs/yolks:java_17","Java 21":"ghcr.io/pelican-eggs/yolks:java_21","Java 25":"ghcr.io/pelican-eggs/yolks:java_25"},"file_denylist":[],"startup":"java -Xms128M -XX:MaxRAMPercentage=95.0 -jar {{SERVER_JAR_FILE}} -minecraftVersion {{GAME_VERSION}}","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}","startup":"{\r\n    \"done\": \")! For help, type \"\r\n}","logs":"{}","stop":"stop"},"scripts":{"installation":{"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","container":"ghcr.io/pelican-eggs/installers:debian","entrypoint":"bash"}},"variables":[{"name":"Server Jar File","description":"The jar executable of the server","env_variable":"SERVER_JAR_FILE","default_value":"server.jar","user_viewable":true,"user_editable":true,"rules":"required|string|regex:/^([\\w\\d._-]+)(\\.jar)$/","field_type":"text"},{"name":"Game Version","description":"The version you want to run","env_variable":"GAME_VERSION","default_value":"1.20.1","user_viewable":false,"user_editable":false,"rules":"required|string|max:20","field_type":"text"},{"name":"Tag Version","description":"Optional","env_variable":"TAG_VERSION","default_value":"latest","user_viewable":false,"user_editable":false,"rules":"required|string|max:20","field_type":"text"}]},"readme":"# Ketting\n\nKetting is a Minecraft server software that combines the best of both Forge and Spigot. It allows you to run mods and plugins on the same server, (hopefully) without any issues.\n\n\n[Ketting Website](https://kettingpowered.org/)\n\n## Server Ports\n\nThe minecraft server requires a single port for access (default 25565) but plugins may require extra ports to enabled for the server.\n\n| Port  | default |\n|-------|---------|\n| Game  | 25565   |\n\n## Notes\nProviding a Minecraft version of ``latest`` or an empty value will default to 1.20.1 as this is the lowest version that Ketting supports.\nThere is no API to query to find the true latest supported version.\n"}