feat: Added a /tab command to display the list of online players

This commit is contained in:
Anon 2026-04-04 16:21:06 +02:00 committed by GitHub
commit 76c3403700
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 729 additions and 2 deletions

View file

@ -2138,7 +2138,7 @@ namespace MinecraftClient.Protocol.Handlers
// Consume all action-selected fields to keep entry boundaries aligned.
if (protocolVersion >= MC_1_21_2_Version && (actionBitset & 1 << 6) > 0) // Actions bit 6: update list order
dataTypes.ReadNextVarInt(packetData);
player.TabListOrder = dataTypes.ReadNextVarInt(packetData);
if (protocolVersion >= MC_1_21_4_Version && (actionBitset & 1 << 7) > 0) // Actions bit 7: update hat
dataTypes.ReadNextBool(packetData);

View file

@ -22,6 +22,8 @@ namespace MinecraftClient.Protocol
public bool Listed = true;
public int TabListOrder;
// Entity info
public Mapping.Entity? entity;
@ -73,6 +75,7 @@ namespace MinecraftClient.Protocol
Uuid = uuid;
Gamemode = -1;
Ping = 0;
TabListOrder = 0;
lastMessageVerified = true;
precedingSignature = null;
}