Minecraft – Creating an SMP Minecraft launcher

minecraft-java-edition

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.

Best Answer

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.