Well, with the old launcher, I was able to create a batch file that allowed for me to automatically start playing Minecraft. I read on the wiki and it said that the launcher accepted a username and a server:port command, for the username I tried entering my username, profile name, and email, and it did not do anything, and neither did the server port command. I am using the exact syntax that is on the wiki, so I do not understand what is wrong.
I also tried using the -u= in front of the username, but then the launcher gives "exit code 1." So, I am just wondering, how do I auto login with the launcher, or is it even possible? Also, are there parameters for selecting a profile? What about changing the version of the current profile with a parameter?
It's somewhat complicated to get it to launch now using just command line :/
Right now, the only way I can figure out how to do it is through a script that generates a session token for you, then runs the Java thing. I have no idea how to generate the script it runs, though :/
This will print out the token you need when run. It should be run like (name of file) (email address) (password). It will then display a session token for you followed by a line break, then the username, which is everything needed to run it that's not static.
... there is a slight chance I might be overlooking something, though. Please do let me know if you find a solution
-
View User Profile
-
View Posts
-
Send Message
Retired StaffWiki format:
I also tried using the -u= in front of the username, but then the launcher gives "exit code 1." So, I am just wondering, how do I auto login with the launcher, or is it even possible? Also, are there parameters for selecting a profile? What about changing the version of the current profile with a parameter?
Thanks!
-
View User Profile
-
View Posts
-
Send Message
Retired StaffRight now, the only way I can figure out how to do it is through a script that generates a session token for you, then runs the Java thing. I have no idea how to generate the script it runs, though :/
#/usr/bin/env python import urllib2 import sys import getpass import json if len(sys.argv) != 3: username = raw_input('Username: ') password = getpass.getpass('Password: ') else: username = sys.argv[1] password = sys.argv[2] data = { "agent": { "name": "Minecraft", "version": 1 }, "username": username, "password": password } req = urllib2.Request(url='https://authserver.mojang.com/authenticate', data=json.dumps(data), headers={"Content-Type": "application/json"}) json = json.loads(urllib2.urlopen(req).read()) username = json['selectedProfile']['name'] access_token = json['accessToken'] profile_id = json['selectedProfile']['id'] session_param = 'token:%s:%s' % (access_token, profile_id) print username print session_paramThis will print out the token you need when run. It should be run like (name of file) (email address) (password). It will then display a session token for you followed by a line break, then the username, which is everything needed to run it that's not static.
... there is a slight chance I might be overlooking something, though. Please do let me know if you find a solution
Need your server status on your website? Check out mcapi.us!
@Syfaro