mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Fix for kick messages : now decoded from Json
This commit is contained in:
parent
30cbc85850
commit
d012905b65
2 changed files with 4 additions and 13 deletions
|
|
@ -156,7 +156,7 @@ namespace MinecraftClient
|
|||
if (tab_list.Length > 0)
|
||||
printstring("§8" + tab_list, false);
|
||||
break;
|
||||
case 0x40: string reason = readNextString();
|
||||
case 0x40: string reason = ChatParser.ParseText(readNextString());
|
||||
ConsoleIO.WriteLine("Disconnected by Server :");
|
||||
printstring(reason, true);
|
||||
connectionlost = true;
|
||||
|
|
@ -455,21 +455,12 @@ namespace MinecraftClient
|
|||
|
||||
Send(login_packet_tosend);
|
||||
|
||||
int size = readNextVarInt(); //Packet size
|
||||
readNextVarInt(); //Packet size
|
||||
int pid = readNextVarInt(); //Packet ID
|
||||
size -= getVarInt(pid).Length;
|
||||
/*
|
||||
while (pid == 0x3F) //Skip some early plugin messages
|
||||
{
|
||||
readData(size);
|
||||
size = readNextVarInt();
|
||||
pid = readNextVarInt();
|
||||
size -= getVarInt(pid).Length;
|
||||
}*/
|
||||
if (pid == 0x00) //Login rejected
|
||||
{
|
||||
Console.WriteLine("Login rejected by Server :");
|
||||
printstring(readNextString().Replace('"', ' '), true);
|
||||
printstring(ChatParser.ParseText(readNextString()), true);
|
||||
return false;
|
||||
}
|
||||
else if (pid == 0x01) //Encryption request
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace MinecraftClient
|
|||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Console Client for MC 1.7.2 - v" + Version + " - By ORelio & Contributors");
|
||||
Console.WriteLine("Console Client for MC 1.7.2 to 1.7.4 - v" + Version + " - By ORelio & Contributors");
|
||||
|
||||
//Basic Input/Output ?
|
||||
if (args.Length >= 1 && args[args.Length - 1] == "BasicIO")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue