ParadigmMC / mcman

Powerful Minecraft Server Manager CLI. Easily install jars (server, plugins & mods) and write config files. Docker and git support included.
GNU General Public License v3.0
131 stars 11 forks source link

Error with older versions of a vanilla minecraft server (tested with 1.12.2) #39

Closed MrPixelized closed 6 months ago

MrPixelized commented 6 months ago

Trying to use a type = "vanilla" [jar] section with mc_version = "1.12.2" leads to the following error on running mcman build:

Error: Resolving Vanilla

Caused by:
    0: error decoding response body: missing field `name` at line 1 column 11698
    1: missing field `name` at line 1 column 11698

I've gotten around this by instead using:

[jar]
type = "url"
url = "https://piston-data.mojang.com/v1/objects/886945bfb2b978778c3a0288fd7fab09d315b25f/server.jar"

Which works, but also means that I have to manually edit the EULA file before starting the server.

It's nice that the system is flexible enough to support this fix, but the whole situation leads to two things:

TheAlan404 commented 6 months ago

Oh, I think I know how to fix this. Expect it fixed in 0.4.3

About the build hooks - I was already planning on something like this but a massive issue with it is platform independency - Windows and Linux shells are greatly different...

TheAlan404 commented 6 months ago

Hold on a second, why didn't you put an eula.txt under the config directory? It'll get copied to server?

MrPixelized commented 6 months ago

I just didn't think of it! But regardless, these build hooks would be quite nice. I think platform independency isn't that hard, just execute a file directly. On linux, the desired program (whether it be shell language or anything else) can be set using the shebang, and on windows you can use links or binaries.

TheAlan404 commented 6 months ago

How would the config for that work? Could you provide any examples if you can think of any? Thanks!

edit: I think creating an issue for this would be better

MrPixelized commented 6 months ago

40