6

I'd like to create a script for my Minecraft client (not necessarily invoking the launcher, if possible) that will launch the game and connect to an SMP server in one swell foop.

What command-line options are supported for the launcher?

And how do I run the actual minecraft.jar of a specific version, not the launcher? I'm talking about the version in ~/.minecraft/bin/minecraft.jar.

I'm on Linux, though it shouldn't matter as its written in Java.

The motivation is largely to make it easier to connect to various servers as I desire.

Fallback is to use a wrapper script that modifies the saved server address in the config file. Easy to do, but of course if there are options to specify server address (and other params) on the command line, it'd be good to know.

  • Too lazy to connect yourself :P – Warface Sep 2 '11 at 0:15
  • Modding games is off topic, including writing a custom launcher. – Invader Skoodge Sep 2 '11 at 1:10
  • 2
    @StrixVaria: I'm not asking how to write a custom launcher, just about what the appropriate command-line options are. Clarified. – MikeyB Sep 2 '11 at 1:37
  • 2
    The launcher is mainly for authentication. If you skip it, you won't be able to play on servers with online-mode=true. – xfs Sep 2 '11 at 14:04
7

The launcher supports passing a server address: see this update info post.

Minecraft <username> <password> <server:port>

<username> is the username you wish to log in as
<password> is your password. If this is set, the launcher will automatically start the game without waiting for you to press the button
<server:port> is an ip to a minecraft server. If this is set, the game will automatically connect to that server once the game has started.

  • Yep, this should do it. I've been using it for a while now and it's worked quite well – Dave McClelland Sep 2 '11 at 13:34
  • 1
    Beauty! It'd be nice to be able to pass the server:port without needing to give a password, but hopefully that'll get fixed eventually. – MikeyB Sep 2 '11 at 14:00
  • @MikeyB You need the password. – haykam Sep 5 '16 at 14:20
2

First of all, which OS are you using ?

Also, I don't think you can avoid using the Minecraft launcher, since it requires to connect your minecraft.net account before connecting to any SMP server.

It that case you would have to recode yourself the whole launcher, just to have 2 or 3 clicks less to connect your server.

Edit: Oh, I forgot the last question. You should have a look here : Minecraft Version Changer Tool

  • 1
    Linux. Of course Minecraft is in Java, so it shouldn't matter. :) – MikeyB Sep 2 '11 at 0:59
  • MVCT looks promising. It does more than I'm looking for but it may do the trick nicely. – MikeyB Sep 2 '11 at 1:07
  • Yep, Minecraft is Java, but launchers are not and are different for each OS :) – Alex B Sep 2 '11 at 1:16
  • Actually, the launchers are all the same code. I've been unwittingly using the Linux one on Windows all this time. – MikeyB Sep 2 '11 at 1:35

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.