Store extended player info, list display names

- Add 1.10.1 and 1.10.2 in supported version list
 - Store both player name and player display names
 - List command will sort players by player name
 - List command will now display by display name
 - Ability to use /list raw to display by real name

Suggestion by Johngreen123
This commit is contained in:
ORelio 2016-08-22 19:09:43 +02:00
parent a4cc36ce05
commit 9a98a9d46f
10 changed files with 156 additions and 85 deletions

View file

@ -160,7 +160,7 @@ namespace MinecraftClient.Protocol.Handlers
case 0xC9:
string name = readNextString(); bool online = readNextByte() != 0x00; readData(2);
Guid FakeUUID = new Guid(MD5.Create().ComputeHash(Encoding.UTF8.GetBytes(name)).Take(16).ToArray());
if (online) { handler.OnPlayerJoin(FakeUUID, name); } else { handler.OnPlayerLeave(FakeUUID); }
if (online) { handler.OnPlayerJoin(new PlayerInfo(FakeUUID, name)); } else { handler.OnPlayerLeave(FakeUUID); }
break;
case 0xCA: if (protocolversion >= 72) { readData(9); } else readData(3); break;
case 0xCB: autocomplete_result = readNextString(); autocomplete_received = true; break;