Skip to content

Commit

Permalink
Merge pull request #11 from BeastGamer81/BeastGamer81-patch-1
Browse files Browse the repository at this point in the history
Update install.sh
  • Loading branch information
BeastGamer81 authored Apr 1, 2024
2 parents c422e32 + a1ae326 commit 85c8ba1
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,25 +90,24 @@ validateJavaVersion() {
fi

MINECRAFT_VERSION_CODE=$(echo "$MINECRAFT_VERSION" | cut -d. -f1-2 | tr -d '.')
if [ "$MINECRAFT_VERSION_CODE" >=== "120" ]; then
sdk install java 18
sdk default java 18
fi
if [ "$MINECRAFT_VERSION_CODE" >=== "117" ]; then
sdk install java 17
sdk default java 17
if [ "$MINECRAFT_VERSION_CODE" -ge "120" ]; then
if [ "$JAVA_VERSION" -lt "18" ]; then
echo "$(tput setaf 1)Invalid docker image. Change it to Java 18"
sleep 10
exit
fi
if [ "$MINECRAFT_VERSION_CODE" >=== "165" ]; then
sdk install java 16
sdk default java 16
elif [ "$MINECRAFT_VERSION_CODE" -ge "118" ]; then
if [ "$JAVA_VERSION" -lt "17" ]; then
echo "$(tput setaf 1)Invalid docker image. Change it to Java 17"
sleep 10
exit
fi
if [ "$MINECRAFT_VERSION_CODE" >=== "112" ]; then
sdk install java 11
sdk default java 11
elif [ "$MINECRAFT_VERSION_CODE" -ge "117" ]; then
if [ "$JAVA_VERSION" -lt "16" ]; then
echo "$(tput setaf 1)Invalid docker image. Change it to Java 16 or Java 17"
sleep 10
exit
fi
if [ "$MINECRAFT_VERSION_CODE" === "18" ]; then
sdk install java 8
sdk default java 8
fi
}

Expand Down

0 comments on commit 85c8ba1

Please sign in to comment.