Just made a new minecraft server 2 hours ago with a fresh user. So the functions are up2date.
The script downloaded the server version 18w30a which is the latest snapshot. Had to manually download latest vanilla, renaming it to minecraft_server.jar and overwriting the current file.
latest snapshot and release from https://launchermeta.mojang.com/mc/game/version_manifest.json
{
"latest":{
"snapshot":"18w30a",
"release":"1.13"
},
"versions":[
{
"id":"18w30a",
"type":"snapshot",
"time":"2018-07-25T14:36:57+00:00",
"releaseTime":"2018-07-25T14:29:31+00:00",
"url":"https://launchermeta.mojang.com/mc/game/7fc78b1de5a9d288a7279524aa071bef2c5160dd/18w30a.json"
},
{
"id":"1.13",
"type":"release",
"time":"2018-07-20T13:11:52+00:00",
"releaseTime":"2018-07-18T15:11:46+00:00",
"url":"https://launchermeta.mojang.com/mc/game/3132596cced9f9d6f1ca97aeec75651e6a9df0bc/1.13.json"
},
....
Describe the bug
Installs wrong version / snapshot version.
Steps to reproduce the behaviour:
Expected behaviour
Should install latest release.
Minimum Information
https://hastebin.com/efujewalix
Ow crap, thanks for reporting.
At the time of correcting the download link for Minecraft, the release and latest were the same, so I couldn't verify this.
Fix will most likely be easy, it's on this line: https://github.com/GameServerManagers/LinuxGSM/blob/master/lgsm/functions/update_minecraft.sh#L12
GitHub
LinuxGSM - Linux Game Server Managers_
I'm going out right now, I'll solve this when I'm back.
I think I got it. Took me like 2 hours for two lines...
Was tough to learn jq even more.
Testing right now. Will patch if it works.
Install works, version check seems to work as well.
Example:
ultimatebyte@gaben:~$ ./mcserver u
[ OK ] Update mcserver: Checking for update: mojang.com
No update available:
Current version: 1.13
Available version: 1.13
[ OK ] Update mcserver: No update available
Patching now.
Can confirm. Works for myself with a new user.
mcserver-console.log:
[01:37:54] [main/WARN]: Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498]
[01:37:54] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[01:37:54] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0]
[01:37:54] [main/WARN]: Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498]
[01:37:54] [main/WARN]: Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[01:37:54] [main/INFO]: Loaded 0 recipes
[01:37:54] [main/INFO]: Loaded 0 advancements
[01:37:54] [Server thread/INFO]: Starting minecraft server version 1.13
....
So the version is right. Thanks for that 馃憤
This one should last now, I think I got the cleanest way to proceed, at least with the current json from Mojang.
-> Gets the latest version, puts it into a jq variable
-> Gets the URL corresponding to the latest version; this URL is another .json containing all the build links from the version
-> Goes to this link to get the link for the server build
All that using jq, not simple when you're discovering it. :o))
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.