Skip to content

Commit

Permalink
feat(update): to version 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
simylein committed Jul 21, 2024
1 parent 04941e4 commit b32a94e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/startup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: TERM="xterm"

- name: setup server
run: chmod +x setup.sh && ./setup.sh --name minecraft --proceed true --version 1.20.5 --port 25565 --eula true --remove true --start false
run: chmod +x setup.sh && ./setup.sh --name minecraft --proceed true --version 1.21 --port 25565 --eula true --remove true --start false

- name: startup server
run: cd minecraft && chmod +x start.sh && ./start.sh --verbose
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ This will start the script in interactive mode and you must answer questions
If you like a straight one-liner which is non-interactive you may use the setup arguments like this

```
./setup.sh --name minecraft --proceed true --version 1.20.5 --port 25565 --eula true --remove true --start true
./setup.sh --name minecraft --proceed true --version 1.21 --port 25565 --eula true --remove true --start true
```

## serverstart
Expand Down
16 changes: 8 additions & 8 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,13 @@ serverDirectory=$(pwd)
# download java executable from mojang
if [[ ${versionArg} == false ]]; then
PS3="$(date +"%H:%M:%S") prompt: which server version would you like to install? "
versions=("1.20.5" "1.19.4" "1.18.2" "1.17.1")
versions=("1.21" "1.20.5" "1.19.4" "1.18.2")
select version in "${versions[@]}"; do
case ${version} in
"1.21")
FetchServerFile "450698d1863ab5180c25d7c804ef0fe6369dd1ba"
break
;;
"1.20.5")
FetchServerFile "79493072f65e17243fd36a699c9a96b4381feb91"
break
Expand All @@ -348,10 +352,6 @@ if [[ ${versionArg} == false ]]; then
FetchServerFile "c8f83c5655308435b3dcf03c06d9fe8740a77469"
break
;;
"1.17.1")
FetchServerFile "a16d67e5807f57fc4e550299cf20226194497dc2"
break
;;
*)
echo "please choose an option from the list: "
;;
Expand All @@ -360,6 +360,9 @@ if [[ ${versionArg} == false ]]; then
elif [[ ${versionArg} == true ]]; then
version="${versionVal}"
case ${version} in
"1.21")
FetchServerFile "450698d1863ab5180c25d7c804ef0fe6369dd1ba"
;;
"1.20.5")
FetchServerFile "79493072f65e17243fd36a699c9a96b4381feb91"
;;
Expand All @@ -369,9 +372,6 @@ elif [[ ${versionArg} == true ]]; then
"1.18.2")
FetchServerFile "c8f83c5655308435b3dcf03c06d9fe8740a77469"
;;
"1.17.1")
FetchServerFile "a16d67e5807f57fc4e550299cf20226194497dc2"
;;
*)
echo "please choose an option from the list: "
;;
Expand Down
4 changes: 2 additions & 2 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ Print "ok" "server successfully stopped"
CachedBackup "update"

# update from url
url="https://launcher.mojang.com/v1/objects/79493072f65e17243fd36a699c9a96b4381feb91/server.jar"
version="1.20.5"
url="https://launcher.mojang.com/v1/objects/450698d1863ab5180c25d7c804ef0fe6369dd1ba/server.jar"
version="1.21"

# Test internet connectivity and update on success
wget --spider --quiet "${url}"
Expand Down

0 comments on commit b32a94e

Please sign in to comment.