从命令行启动Minecraft - usename和密码作为前缀 [英] Launch Minecraft from command line - usename and password as prefix

查看:1027
本文介绍了从命令行启动Minecraft - usename和密码作为前缀的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想做一个简单的自定义Minecraft启动器的东西。

I'm trying to make a simple custom Minecraft launcher thing.

根据minecraft wiki的启动器页面:
http:// www.minecraftwiki.net/wiki/Minecraft_launcher
应该可以从命令行使用用户名和密码作为前缀运行minecraft启动器,并直接进入游戏,而不是通过启动器。

According to minecraft wiki's Launcher page: http://www.minecraftwiki.net/wiki/Minecraft_launcher, it should be possible to run the minecraft launcher using username and password as prefix from the command line, and go directly to the game instead of through the launcher.

我尝试了各种版本的 java -cp -u = username -p = password minecraft.jar net.minecraft.LauncherFrame ,它说的是旧的方法:

I've tried various versions of java -cp -u=username -p=password minecraft.jar net.minecraft.LauncherFrame, and what it says is the old method:

java -cp minecraft.jar net.minecraft.LauncherFrame <username> <password>

旧方法打开了Minecraft启动器,就像我双击jar文件一样。

The old method opens the minecraft launcher, just as if I double clicked the jar file. It does not go directly to the menu screen.

新的方式,使用密码和用户名作为前缀,只是给我一个错误信息,说前缀-u = username或-p =密码不存在

The new way, using password and username as prefix, just give me an error message saying the prefix -u=username or -p=password don't exist.

有任何帮助吗?我真的很困惑:/

Any help on this? I'm really stuck :/

推荐答案

可以这样做,你只需要绕过

You can do this, you just need to circumvent the launcher.

%appdata%\.minecraft\bin (或〜 /.minecraft/bin 在unixy系统上),有一个minecraft.jar文件。

In %appdata%\.minecraft\bin (or ~/.minecraft/bin on unixy systems), there is a minecraft.jar file. This is the actual game - the launcher runs this.

这样调用:

java -Xms512m -Xmx1g -Djava.library.path=natives/ -cp "minecraft.jar;lwjgl.jar;lwjgl_util.jar" net.minecraft.client.Minecraft <username> <sessionID>

将工作目录设置为 .minecraft / bin

要获取会话ID,POST(请求此页面):

To get the session ID, POST (request this page):

https://login.minecraft.net?user=<username>&password=<password>&version=13

您会得到如下响应:

1343825972000:deprecated:SirCmpwn:7ae9007b9909de05ea58e94199a33b30c310c69c:dba0c48e1c584963b9e93a038a66bb98

第四个字段是会话ID。 此处的更多详情阅读这些详细信息,此答案已过时

The fourth field is the session ID. More details here. Read those details, this answer is outdated

这是一个登录到C#中的minecraft.net的示例,并且启动minecraft.jar的示例

这篇关于从命令行启动Minecraft - usename和密码作为前缀的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆