mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
1.19.3 Chat command signing support & Update chat paser
This commit is contained in:
parent
fe0b268878
commit
0ce9690778
6 changed files with 164 additions and 103 deletions
|
|
@ -5,31 +5,31 @@ namespace MinecraftClient.Protocol.Message
|
|||
public class ChatMessage
|
||||
{
|
||||
// in 1.19 and above, isSignedChat = true
|
||||
public readonly bool isSignedChat;
|
||||
public bool isSignedChat;
|
||||
|
||||
public readonly string content;
|
||||
public string content;
|
||||
|
||||
public readonly bool isJson;
|
||||
public bool isJson, isSenderJson;
|
||||
|
||||
// 0: chat (chat box), 1: system message (chat box), 2: game info (above hotbar), 3: say command,
|
||||
// 4: msg command, 5: team msg command, 6: emote command, 7: tellraw command
|
||||
public readonly int chatTypeId;
|
||||
public int chatTypeId;
|
||||
|
||||
public readonly Guid senderUUID;
|
||||
public Guid senderUUID;
|
||||
|
||||
public readonly bool isSystemChat;
|
||||
public bool isSystemChat;
|
||||
|
||||
public readonly string? unsignedContent;
|
||||
public string? unsignedContent;
|
||||
|
||||
public readonly string? displayName;
|
||||
public string? displayName;
|
||||
|
||||
public readonly string? teamName;
|
||||
public string? teamName;
|
||||
|
||||
public readonly DateTime? timestamp;
|
||||
public DateTime? timestamp;
|
||||
|
||||
public readonly byte[]? signature;
|
||||
public byte[]? signature;
|
||||
|
||||
public readonly bool? isSignatureLegal;
|
||||
public bool? isSignatureLegal;
|
||||
|
||||
public ChatMessage(string content, bool isJson, int chatType, Guid senderUUID, string? unsignedContent, string displayName, string? teamName, long timestamp, byte[] signature, bool isSignatureLegal)
|
||||
{
|
||||
|
|
@ -47,11 +47,12 @@ namespace MinecraftClient.Protocol.Message
|
|||
this.isSignatureLegal = isSignatureLegal;
|
||||
}
|
||||
|
||||
public ChatMessage(string content, bool isJson, int chatType, Guid senderUUID, bool isSystemChat = false)
|
||||
public ChatMessage(string content, string? displayName, bool isJson, int chatType, Guid senderUUID, bool isSystemChat = false)
|
||||
{
|
||||
isSignedChat = isSystemChat;
|
||||
this.isSystemChat = isSystemChat;
|
||||
this.content = content;
|
||||
this.displayName = displayName;
|
||||
this.isJson = isJson;
|
||||
chatTypeId = chatType;
|
||||
this.senderUUID = senderUUID;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue