Add login request and response debug messages

See #269

+ Add exaxct mono packages in README, thanks @Pokechu22 for that
This commit is contained in:
ORelio 2017-04-17 15:58:44 +02:00
parent bab472df05
commit ffb1adeb4d
2 changed files with 9 additions and 2 deletions

View file

@ -219,9 +219,13 @@ namespace MinecraftClient.Protocol
string result = "";
string json_request = "{\"agent\": { \"name\": \"Minecraft\", \"version\": 1 }, \"username\": \"" + JsonEncode(user) + "\", \"password\": \"" + JsonEncode(pass) + "\", \"clientToken\": \"" + JsonEncode(session.ClientID) + "\" }";
if (Settings.DebugMessages)
ConsoleIO.WriteLineFormatted("§8Debug: Login Request: " + json_request);
int code = DoHTTPSPost("authserver.mojang.com", "/authenticate", json_request, ref result);
if (code == 200)
{
if (Settings.DebugMessages)
ConsoleIO.WriteLineFormatted("§8Debug: Login Response: " + result);
if (result.Contains("availableProfiles\":[]}"))
{
return LoginResult.NotPremium;

View file

@ -14,9 +14,12 @@ in a fast and easy way without having to open the main Minecraft game.
First, extract the archive if not already extracted.
On Windows, simply open MinecraftClient.exe by double-clicking on it.
On Mac or Linux, open a terminal in this folder and run "mono MinecraftClient.exe".
On Mac or Linux you need to install the Mono Runtime:
- On Mac: http://www.mono-project.com/download/#download-mac
- On Linux: sudo apt-get install mono-runtime libmono-reflection-cil
Then, open a terminal in this folder and run "mono MinecraftClient.exe".
If you cannot authenticate on Mono, you'll need to run "mozroots --import --ask-remove" once.
If Mono crashes, retry with mono-complete, not mono-runtime. Mono v4.0 to 4.2 is recommended.
If Mono crashes, retry with mono-complete instead of mono-runtime. Mono v4.0 to 4.2 is recommended.
===========================================
Using Configuration files & Enabling bots