1

Im just wondering and searching for a way to launch minecraft from a single button or cli for a project im doing which is creating a simple launcher that will load into my server. Please help because there are alot of topics and none of theme are self explanatory.

edited For right now, using minecraft:\ServerIPAddress (ie: minecraft:\mcgoogle.freehost.com), will work but only if you have Bedrock(all versions except Java) installed.

  • This tutorial creates a script to run MCJava 1.12.1 on Raspberry Pi without needing the launcher afterwards, it should be possible to adapt it to 1.12.2 and 64bit computers. Is that what you imagined? Then I can probably make an answer based on that. – Fabian Röling Apr 4 at 6:08
  • Thank you @FabianRöling. Ill keep looking myself. – Nanobug Apr 4 at 20:49
  • 3
    I asked whether that was something like you imagined it or not. – Fabian Röling Apr 5 at 1:14
1

i don't think this is rightfully possible. when you load Minecraft, the Launcher downloads all the assets etc. on load to prevent unneeded space wasted-- then Minecraft takes the time to load the world when you tell it to rather than pre-loading it on boot. that being said, if you can somehow bypass this loading sequence (which i imagine with the Launcher version they made when Microsoft acquired Mojang is very difficult), then i would assume that you could tell it to just up and load it all.

0

If you are targeting people still using the old java Minecraft launcher, there are command line parameters you can give to automatically connect to a server:

java -jar .minecraft/launcher.jar --server <ip here> -- port 25565

That way people only have to press the play button in the launcher, and then the game starts and connects to the server in question.

  • as was stated gaming.stackexchange.com/a/348749/229636. Also I made a batch file that will load you right on in. Though, it uses the old launcher, its still completely updated as Mojang will not abandon their old version and everyone still has a copy of it in the %appdata%.minecraft folder called "launcher.jar". So if you see it there, there's where the batch file or your command windows need to be to make it work. Here is a complete example if it is allowed that was created today by my for another question github.com/NanobugXL/CLI-Launcher – Nanobug Apr 11 at 3:31
0

Ok, so I finally managed to actually get something going, thanks and big shouts out to @Ferrybig for his input.

So if you create a Batch file, you would start out your script just as suggested above from @FerryBig java -jar .minecraft/launcher.jar --server <ip here> -- port 25565

Nexe, editing some parts with your own server address and port number. You can also even adjust the amount of ram as well, to suit your needs. Below are two examples:

java -jar launcher.jar --server youripordomain.here --port 25567 -Xms1G -Xmx3G -d64 -jar minecraft_server.1.13.2.jar Edit the port number as well, be sure to leave all whitespaces as they are. The next big fact or you will face your client crashing while trying to connect, is make sure jar minecraft_server.1.13.2.jar version matches

Save your file like START.bat and hold shift + right-click anywhere near the bat file you've just created and choose Open Powershell Here or whatever command interface you want to use.

This is what the final code should look like java -jar launcher.jar --server mc.westeroscraft.com --port 25567 -Xms1G -Xmx3G -d64 -jar minecraft_server.1.13.2.jar nogui

Type in the files name you just created like: START.bat Watch the magic happen. :) Thank you.

Also, this would help if you have a copy of your Launcher.jar file in the same directory as your .bat file

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.