diff --git a/README.md b/README.md index c65b870e..b3861fed 100644 --- a/README.md +++ b/README.md @@ -317,9 +317,19 @@ A [Tuinity](https://github.com/Spottedleaf/Tuinity) server, which is a fork of P > **NOTE** only `VERSION=LATEST` is supported +## Running an Airplane server + +An [Airplane](https://github.com/TECHNOVE/Airplane) server, which is a fork of Tuinity aimed at further improving server performance at high playercounts. + + -e TYPE=AIRPLANE + +> **NOTE** only `VERSION=LATEST` is supported + +> **NOTE** only Java 8 and 11 are supported + ## Running a Purpur server -A [Purpur](https://purpur.pl3x.net/) server, which is "a fork of Paper and Tuinity with the goal of providing new and interesting configuration options". +A [Purpur](https://purpur.pl3x.net/) server, which is "a fork of Paper, Tuinity, Airplane with the goal of providing new and interesting configuration options". -e TYPE=PURPUR diff --git a/start-configuration b/start-configuration index 1a689a1b..c02bce98 100644 --- a/start-configuration +++ b/start-configuration @@ -163,12 +163,16 @@ case "${TYPE^^}" in YATOPIA) exec ${SCRIPTS:-/}start-deployYatopia "$@" ;; + + AIRPLANE) + exec ${SCRIPTS:-/}start-deployAirplane "$@" + ;; *) log "Invalid type: '$TYPE'" log "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FTBA (multiarch-only)," log " CURSE_INSTANCE, CURSEFORGE, SPONGEVANILLA, TUINITY, PURPUR" - log " CUSTOM, MAGMA, MOHIST, CATSERVER, YATOPIA" + log " CUSTOM, MAGMA, MOHIST, CATSERVER, YATOPIA, AIRPLANE" exit 1 ;; diff --git a/start-deployAirplane b/start-deployAirplane new file mode 100644 index 00000000..69a4a6fd --- /dev/null +++ b/start-deployAirplane @@ -0,0 +1,37 @@ +#!/bin/bash +set -euo pipefail +IFS=$'\n\t' + +. ${SCRIPTS:-/}start-utils +isDebugging && set -x + +JAVA_VER=$(java -version 2>&1 | head -1 | cut -d'"' -f2 | sed '/^1\./s///' | cut -d'.' -f1) + +if [ "${JAVA_VER}" != "8" ] && [ "${JAVA_VER}" != "11" ]; then + log "ERROR: Airplane server type only supports Java versions 8 and 11" + exit 1 +fi + +if [ "${VERSION}" != "LATEST" ]; then + log "ERROR: Airplane server type only supports VERSION=LATEST" + exit 1 +fi + +export SERVER=airplane-${VANILLA_VERSION}-jdk${JAVA_VER}.jar + +if [ ! -f "$SERVER" ] || [ -n "$FORCE_REDOWNLOAD" ]; then + downloadUrl="https://dl.airplane.gg/latest/Airplane-JDK${JAVA_VER}/launcher-airplane.jar" + log "Downloading Airplane from $downloadUrl ..." + curl -fsSL -o "$SERVER" "$downloadUrl" + if [ ! -f "$SERVER" ]; then + log "ERROR: failed to download from $downloadUrl (status=$?)" + exit 3 + fi +fi + +# Normalize on Spigot for later operations +export TYPE=SPIGOT +export SKIP_LOG4J_CONFIG=true + +# Continue to Final Setup +exec ${SCRIPTS:-/}start-finalSetupWorld $@