1701803313a:19:{s:2:"id";i:158;s:11:"external_id";s:7:"wmx-207";s:4:"uuid";s:36:"4d89bca0-2472-432e-841e-185430ae74b3";s:10:"identifier";s:8:"4d89bca0";s:4:"name";s:17:"Minecraft Forge S";s:11:"description";s:40:"SwiftByte || Minecraft Forge S || Trinex";s:6:"status";s:10:"installing";s:9:"suspended";b:0;s:6:"limits";a:7:{s:6:"memory";i:4096;s:4:"swap";i:0;s:4:"disk";i:15360;s:2:"io";i:500;s:3:"cpu";i:300;s:7:"threads";N;s:12:"oom_disabled";b:1;}s:14:"feature_limits";a:3:{s:9:"databases";i:0;s:11:"allocations";i:0;s:7:"backups";i:1;}s:4:"user";i:18;s:4:"node";i:3;s:10:"allocation";i:1003;s:4:"nest";i:1;s:3:"egg";i:2;s:9:"container";a:4:{s:15:"startup_command";s:180:"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" )";s:5:"image";s:32:"ghcr.io/pterodactyl/yolks:java_8";s:9:"installed";i:0;s:11:"environment";a:12:{s:14:"SERVER_JARFILE";s:10:"server.jar";s:10:"MC_VERSION";s:6:"latest";s:10:"BUILD_TYPE";s:11:"recommended";s:13:"FORGE_VERSION";s:0:"";s:11:"MAX_PLAYERS";s:1:"4";s:4:"MOTD";s:24:"Powered by Swift-Byte.de";s:9:"GAME_MODE";s:8:"survival";s:4:"SEED";s:0:"";s:7:"STARTUP";s:180:"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" )";s:17:"P_SERVER_LOCATION";s:7:"Hetzner";s:13:"P_SERVER_UUID";s:36:"4d89bca0-2472-432e-841e-185430ae74b3";s:25:"P_SERVER_ALLOCATION_LIMIT";i:0;}}s:10:"updated_at";s:25:"2023-12-04T19:08:31+00:00";s:10:"created_at";s:25:"2023-12-04T19:08:31+00:00";s:13:"relationships";a:6:{s:11:"allocations";a:2:{s:6:"object";s:4:"list";s:4:"data";a:1:{i:0;a:2:{s:6:"object";s:10:"allocation";s:10:"attributes";a:6:{s:2:"id";i:1003;s:2:"ip";s:12:"85.10.197.56";s:5:"alias";N;s:4:"port";i:26004;s:5:"notes";N;s:8:"assigned";b:1;}}}}s:4:"user";a:2:{s:6:"object";s:4:"user";s:10:"attributes";a:12:{s:2:"id";i:18;s:11:"external_id";s:6:"wmx-25";s:4:"uuid";s:36:"2a0c2fef-a096-4d54-96a7-d31ce82d2387";s:8:"username";s:9:"trinex239";s:5:"email";s:29:"kevinbadergoll@googlemail.com";s:10:"first_name";s:5:"Kevin";s:9:"last_name";s:9:"Badergoll";s:8:"language";s:2:"en";s:10:"root_admin";b:1;s:3:"2fa";b:0;s:10:"created_at";s:25:"2023-11-28T12:22:39+00:00";s:10:"updated_at";s:25:"2023-12-04T17:17:34+00:00";}}s:4:"nest";a:2:{s:6:"object";s:4:"nest";s:10:"attributes";a:7:{s:2:"id";i:1;s:4:"uuid";s:36:"e4d495c7-d25b-4fdd-b247-b8f800af707b";s:6:"author";s:22:"support@pterodactyl.io";s:4:"name";s:9:"Minecraft";s:11:"description";s:95:"Minecraft - the classic game from Mojang. With support for Vanilla MC, Spigot, and many others!";s:10:"created_at";s:25:"2023-07-07T15:40:27+00:00";s:10:"updated_at";s:25:"2023-07-07T15:40:27+00:00";}}s:3:"egg";a:2:{s:6:"object";s:3:"egg";s:10:"attributes";a:13:{s:2:"id";i:2;s:4:"uuid";s:36:"8bc3c2ea-a493-41e8-a447-c9f794da5960";s:4:"name";s:14:"Forge Enhanced";s:4:"nest";i:1;s:6:"author";s:22:"support@pterodactyl.io";s:11:"description";s:187:"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.";s:12:"docker_image";s:32:"ghcr.io/pterodactyl/yolks:java_8";s:13:"docker_images";a:5:{s:6:"Java 8";s:32:"ghcr.io/pterodactyl/yolks:java_8";s:7:"Java 11";s:33:"ghcr.io/pterodactyl/yolks:java_11";s:7:"Java 16";s:33:"ghcr.io/pterodactyl/yolks:java_16";s:7:"Java 17";s:33:"ghcr.io/pterodactyl/yolks:java_17";s:7:"Java 18";s:33:"ghcr.io/pterodactyl/yolks:java_18";}s:6:"config";a:6:{s:5:"files";a:2:{s:17:"server.properties";a:2:{s:6:"parser";s:10:"properties";s:4:"find";a:7:{s:9:"server-ip";s:7:"0.0.0.0";s:11:"server-port";s:29:"{{server.build.default.port}}";s:10:"query.port";s:29:"{{server.build.default.port}}";s:11:"max-players";s:19:"{{env.MAX_PLAYERS}}";s:4:"motd";s:12:"{{env.MOTD}}";s:8:"gamemode";s:17:"{{env.GAME_MODE}}";s:10:"level-name";s:12:"{{env.SEED}}";}}s:8:"eula.txt";a:2:{s:6:"parser";s:10:"properties";s:4:"find";a:1:{s:4:"eula";s:4:"true";}}}s:7:"startup";a:1:{s:4:"done";s:18:")! For help, type ";}s:4:"stop";s:4:"stop";s:4:"logs";a:0:{}s:13:"file_denylist";a:0:{}s:7:"extends";N;}s:7:"startup";s:180:"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" )";s:6:"script";a:5:{s:10:"privileged";b:1;s:7:"install";s:5124:"#!/bin/bash
# Forge Installation Script
#
# Server Files: /mnt/server
apt update
apt install -y curl jq

if [[ ! -d /mnt/server ]]; then
  mkdir /mnt/server
fi

cd /mnt/server

# Remove spaces from the version number to avoid issues with curl
FORGE_VERSION="$(echo "$FORGE_VERSION" | tr -d ' ')"
MC_VERSION="$(echo "$MC_VERSION" | tr -d ' ')"

if [[ ! -z ${FORGE_VERSION} ]]; then
  DOWNLOAD_LINK=https://maven.minecraftforge.net/net/minecraftforge/forge/${FORGE_VERSION}/forge-${FORGE_VERSION}
  FORGE_JAR=forge-${FORGE_VERSION}*.jar
else
  JSON_DATA=$(curl -sSL https://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json)

  if [[ "${MC_VERSION}" == "latest" ]] || [[ "${MC_VERSION}" == "" ]]; then
    echo -e "getting latest version of forge."
    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("latest")) | split("-")[0]' | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n | tail -1)
    BUILD_TYPE=latest
  fi

  if [[ "${BUILD_TYPE}" != "recommended" ]] && [[ "${BUILD_TYPE}" != "latest" ]]; then
    BUILD_TYPE=recommended
  fi

  echo -e "minecraft version: ${MC_VERSION}"
  echo -e "build type: ${BUILD_TYPE}"

  ## some variables for getting versions and things
  FILE_SITE=https://maven.minecraftforge.net/net/minecraftforge/forge/
  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))')

  ## locating the forge version
  if [[ "${VERSION_KEY}" == "" ]] && [[ "${BUILD_TYPE}" == "recommended" ]]; then
    echo -e "dropping back to latest from recommended due to there not being a recommended version of forge for the mc version requested."
    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("latest"))')
  fi

  ## Error if the mc version set wasn't valid.
  if [ "${VERSION_KEY}" == "" ] || [ "${VERSION_KEY}" == "null" ]; then
    echo -e "The install failed because there is no valid version of forge for the version of minecraft selected."
    exit 1
  fi

  FORGE_VERSION=$(echo -e ${JSON_DATA} | jq -r --arg VERSION_KEY "$VERSION_KEY" '.promos | .[$VERSION_KEY]')

  if [[ "${MC_VERSION}" == "1.7.10" ]] || [[ "${MC_VERSION}" == "1.8.9" ]]; then
    DOWNLOAD_LINK=${FILE_SITE}${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}/forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}
    FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}.jar
    if [[ "${MC_VERSION}" == "1.7.10" ]]; then
      FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}-universal.jar
    fi
  else
    DOWNLOAD_LINK=${FILE_SITE}${MC_VERSION}-${FORGE_VERSION}/forge-${MC_VERSION}-${FORGE_VERSION}
    FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}.jar
  fi
fi

#Adding .jar when not eding by SERVER_JARFILE
if [[ ! $SERVER_JARFILE = *\.jar ]]; then
  SERVER_JARFILE="$SERVER_JARFILE.jar"
fi

#Downloading jars
echo -e "Downloading forge version ${FORGE_VERSION}"
echo -e "Download link is ${DOWNLOAD_LINK}"

if [[ ! -z "${DOWNLOAD_LINK}" ]]; then
  if curl -sSL --output /dev/null --head --fail ${DOWNLOAD_LINK}-installer.jar; then
    echo -e "installer jar download link is valid."
  else
    echo -e "link is invalid. Exiting now"
    exit 2
  fi
else
  echo -e "no download link provided. Exiting now"
  exit 3
fi

curl -sSL -o installer.jar ${DOWNLOAD_LINK}-installer.jar

#Checking if downloaded jars exist
if [[ ! -f ./installer.jar ]]; then
  echo "!!! Error downloading forge version ${FORGE_VERSION} !!!"
  exit
fi

function  unix_args {
  echo -e "Detected Forge 1.17 or newer version. Setting up forge unix args."
  ln -sf libraries/net/minecraftforge/forge/*/unix_args.txt unix_args.txt
}

# Delete args to support downgrading/upgrading
rm -rf libraries/net/minecraftforge/forge
rm unix_args.txt

#Installing server
echo -e "Installing forge server.\n"
java -jar installer.jar --installServer || { echo -e "install failed using Forge version ${FORGE_VERSION} and Minecraft version ${MINECRAFT_VERSION}"; exit 4; }

# Check if we need a symlink for 1.17+ Forge JPMS args
if [[ $MC_VERSION =~ ^1\.(17|18|19|20|21|22|23) || $FORGE_VERSION =~ ^1\.(17|18|19|20|21|22|23) ]]; then
  unix_args

# Check if someone has set MC to latest but overwrote it with older Forge version, otherwise we would have false positives
elif [[ $MC_VERSION == "latest" && $FORGE_VERSION =~ ^1\.(17|18|19|20|21|22|23) ]]; then
  unix_args
else
  # For versions below 1.17 that ship with jar
  mv $FORGE_JAR $SERVER_JARFILE
fi

echo -e "Deleting installer.jar file.\n"
rm -rf installer.jar

echo "-----------------------------------------"
echo "Installation completed..."
echo "-----------------------------------------"";s:5:"entry";s:4:"bash";s:9:"container";s:18:"openjdk:8-jdk-slim";s:7:"extends";N;}s:10:"created_at";s:25:"2023-07-07T15:40:27+00:00";s:10:"updated_at";s:25:"2023-12-04T18:31:24+00:00";}}s:8:"location";a:2:{s:6:"object";s:8:"location";s:10:"attributes";a:5:{s:2:"id";i:1;s:5:"short";s:7:"Hetzner";s:4:"long";s:21:"Server in Deutschland";s:10:"updated_at";s:25:"2023-11-04T14:53:19+00:00";s:10:"created_at";s:25:"2023-07-07T15:45:08+00:00";}}s:4:"node";a:2:{s:6:"object";s:4:"node";s:10:"attributes";a:21:{s:2:"id";i:3;s:4:"uuid";s:36:"45598ab9-7d49-4df9-9dcf-201e7f407388";s:6:"public";b:1;s:4:"name";s:5:"Node1";s:11:"description";N;s:11:"location_id";i:1;s:4:"fqdn";s:19:"node1.swift-byte.de";s:6:"scheme";s:5:"https";s:12:"behind_proxy";b:0;s:16:"maintenance_mode";b:0;s:6:"memory";i:61440;s:19:"memory_overallocate";i:0;s:4:"disk";i:409600;s:17:"disk_overallocate";i:0;s:11:"upload_size";i:100;s:13:"daemon_listen";i:8080;s:11:"daemon_sftp";i:2022;s:11:"daemon_base";s:28:"/var/lib/pterodactyl/volumes";s:10:"created_at";s:25:"2023-07-09T15:14:25+00:00";s:10:"updated_at";s:25:"2023-11-16T10:51:18+00:00";s:19:"allocated_resources";a:2:{s:6:"memory";i:49664;s:4:"disk";i:236544;}}}}}