diff --git a/minecraft-server/start-minecraft.sh b/minecraft-server/start-minecraft.sh index bb65c4c6..f1ff296e 100755 --- a/minecraft-server/start-minecraft.sh +++ b/minecraft-server/start-minecraft.sh @@ -211,9 +211,17 @@ function installForge { fi # NOTE $shortForgeVersion will be empty if installer location was given to us - forgeJars=$(ls *forge*$shortForgeVersion*.jar) - SERVER=${forgeJars/$FORGE_INSTALLER/} - if [ -z $SERVER ]; then + for j in *forge*.jar; do + case $j in + *installer*) + ;; + *) + SERVER=$j + break + ;; + esac + done + if [[ -z $SERVER ]]; then echo "Unable to derive server jar for Forge" exit 2 fi