16

I have two kids with different Minecraft accounts on the same Linux computer.

Previously, I made each of them an icon which ran this:

java -cp ~/minecraft/minecraft.jar net.minecraft.LauncherFrame [email protected] -p=password servername.example.org:3000

with a separate email and password for each kid.

This does not seem to work with the new launcher, which actually has the concept of separate-user profiles, but ironically ends up being quite a bit less elegant than this. (I asked on a minecraft forum site, but only got "why would you want to do that?")

Is there a way to similarly specify the profile to launch and server to connect to on the command line of the new launcher?

2 Answers 2

5

You can make separate work directories for the launcher and start it like this:

java -jar ~/minecraft/Minecraft.jar --workDir ~/minecraft/user1/
java -jar ~/minecraft/Minecraft.jar --workDir ~/minecraft/user2/
#etc

(For Windows users, just specify the folders as you normally would: e.g. java -jar "D:\Games\Minecraft\Minecraft.jar" --workDir "D:\Games\Minecraft\User1\")

By doing this, you will get completely separate environments for the game, so each one of them will keep its own login data (you still need to press the "Play" button), but will also have separate worlds and resource packs, and the launcher will download/update the game separately.
However, that can behavior can be changed, especially easily on Linux. You can share the singleplayer worlds, for example, if you make a symlink to one environment's saves folder in other folder(s).

There seems to be no way to connect to a server with a command line parameter, because the only command line parameters the launcher accepts right now are: work directory, proxy server, force update. (use --help to look at that)

6
  • Would this also work if multiple accounts wanted to run on a shared server world?
    – Batophobia
    Commented Jul 1, 2013 at 20:47
  • @DavidStarkey There is no problem in connecting to the same server, if that's what you're asking.
    – BlaXpirit
    Commented Jul 1, 2013 at 20:48
  • 1
    OP had commands that (presumably) would automatically log in the separate accounts. Is there a way to get these to do that as well?
    – Batophobia
    Commented Jul 1, 2013 at 20:55
  • @DavidStarkey I do believe the lack of that right now is what is holding back launchers like MultiMC from jumping to the 1.6.* release versions.
    – James
    Commented Jul 1, 2013 at 23:23
  • This doesn't really answer the question except for in the last line, where it says "no". That should probably be first. The rest -- multiple workdirs -- can actually be done within the gui of the launcher, and if we can't bypass that screen automatically, might as well use it.
    – mattdm
    Commented Jul 12, 2013 at 13:13
0

The command you need is (source)

java -cp Minecraft.jar net.minecraft.bootstrap.Bootstrap 

When you launch it, it will run the updates, so you'll want to have internet connection. :)

1
  • 1
    How does that specify which profile to use? Commented Jul 17, 2013 at 16:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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