8

I am currently playing a server with my friends on the new Minecraft snapshot and I constantly have to update it because they release a new snapshot often. I was wondering if it was possible for every time I start the Minecraft server that it checks for a new version. If there is a new version, it downloads it and restarts the server.

  • 2
    You would need to know some programming but yes it is possible. I'm not posting this as an answer because I don't know exactly how, I'm just stating that it is in fact possible. Best of luck to you. – Baked Potato Aug 8 '14 at 20:05
  • Like @BakedPotato said, a short script would be needed. However, with that being said, this is actually a fairly simple project. I gaurentee you that with a little research/ effort you could do it. Its a great project to learn some programming, which is a useful skill to have. – Ashwin Gupta Feb 19 '16 at 2:59
  • 1
    @BakedPotato fairly simple actually. Java (language that MC is written in) has a library with a FileUtils class which can retrieve files from the internet. You can then programatically copy it over to the directory of the server. Then it has a Process class which can execute EXEs. Very easy. – Ashwin Gupta Feb 19 '16 at 3:01
  • Iramos, if you are interested, I'd be happy to write you the java code that can do it. It is quite simple. It would probably take me 1-3 days though since I'm very busy tomorrow/saturday. – Ashwin Gupta Feb 19 '16 at 4:11
5
+50

You can use McSvSnapshotUpdater to accomplish this, you can download it here.

Once you download it, you can extract the files in the zip file to the server directory, then every time you launch it, it'll update the file "minecraftsnapshotserver.jar" to the latest version.

If you launch the server through a bat file, you can edit it to look like this, and everytime you launch it, it'll check for updates and download the newest version (if there is any) and will launch that:

title run-minecraft
mcsvsu.exe
java -Xms1024M -Xmx2048M -jar minecraftsnapshotserver.jar nogui
pause

Or if you want to rename the server before running it, (replace newnameoffile with what you want)

title run-minecraft
mcsvsu.exe
if exist newnameoffile.jar del newnameoffile.jar
ren minecraftsnapshotserver.jar newnameoffile.jar
java -Xms1024M -Xmx2048M -jar newnameoffile.jar nogui
pause

Disclaimer: This software is developed, maintained and published by me.

  • 1
    It was fun developing this. – Ave Dec 14 '15 at 19:07
  • @ardaozkai nice. Did you use apache commons-io? Also, if its open source I'd love to see the git link. – Ashwin Gupta Feb 19 '16 at 4:33
  • @AshwinGupta I used C# here, but I'm considering rewriting it as a small python file too. However the code should be mono compatible already, so rewriting won't help much. – Ave Feb 19 '16 at 5:57
  • Eww c# :P! No JK. I'll write a java version for this because I actually need it for myself. I'll credit your project though as the inspiration. – Ashwin Gupta Feb 19 '16 at 5:59
1

Sadly, not without some programming. You have to manually go to minecraft.net and download the latest server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.