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)
If you are using the latest vanilla launcher:
- Create or edit a profile
- Check the box labeled "Game Directory" and fill in a location to put it. It will automatically create the directory if it doesn't exist on next launch of the profile. (Note that I doubt it will expand shell variables, but it works just fine with symbolic links if you use those)
- Click Save Profile
What I have done for this is I have created a directory under my $HOME called .minecraftProfiles and I put each separate profile in its own subdirectory. For example, vanilla 1.7.4 I have put at homedir/.minecraftProfiles/1.7.4-vanilla
.
Sharing data between profiles:
- If and when I want to share a file and keep it shared (for better or for worse) I would symlink to it from one profile in the other(s).
- If I want to use some data (saves and such) as a basis for a new profile, I first copy the directory to a new one, create the new profile in the launcher (click "New Profile" when the one I'm copying is the selected profile), and after starting up that profile, (if necessary) do manual editing of the
$HOME/.minecraft/versions/profilename/profilename.json
when it is needed to have it actually keep some necessary data (if same version of Minecraft and wanting to keep Forge, for example)
Tips to avoid issues with losing valuable data:
- Keep multiple profiles in separate directories to avoid conflicting mods or mod configurations.
- Each profile should have a specific version set for the "Use version" under "Version Selection" in the Profile Editor to prevent it automatically updating and preventing you from playing on servers that haven't updated.
- Backup, backup, backup - before adding/removing mods, changing the version of a profile, and especially regular backups just in case your computer (or just Minecraft) crashes.
If you are not using the vanilla launcher (read: FTB / Technic launchers), all I can say with 100% reliability is you would have to either use a separate user account (for Linux, which you should be for different people anyways according to many Linux security specialists) or deal with moving the storage location of those launchers manually each time before starting.
(partially off topic) I choose to use a naming scheme of version-info
for the naming of my profiles' directories, but you can opt for adding the user's name at the beginning of it.
Best Answer
You can do this in the "Profile Editor" tab of the launcher. Just right click on the profile you want to delete, and hit "Delete Profile."