Added text parsing in the tab player list

This commit is contained in:
Anon 2026-04-04 22:25:40 +02:00
parent 16e3a69211
commit 32d5ad1108

View file

@ -2189,7 +2189,7 @@ namespace MinecraftClient.Protocol.Handlers
string? displayName = null;
if (dataTypes.ReadNextBool(packetData)) // Has display name
displayName = dataTypes.ReadNextString(packetData); // Display name
displayName = ChatParser.ParseText(dataTypes.ReadNextString(packetData)); // Display name
// 1.19 Additions
long? keyExpiration = null;
@ -2230,7 +2230,7 @@ namespace MinecraftClient.Protocol.Handlers
{
var player = handler.GetPlayerInfo(uuid);
if (player is not null)
player.DisplayName = dataTypes.ReadNextString(packetData);
player.DisplayName = ChatParser.ParseText(dataTypes.ReadNextString(packetData));
else
dataTypes.SkipNextString(packetData);
}