class

Rosegold::ChatManager

Inherits Reference / Object

Manages chat message signing, salt generation, and acknowledgment tracking according to the Minecraft 1.21.8 protocol requirements.

Constants

MAX_LAST_SEEN_MESSAGES = 20
SIGNATURE_SIZE = 256

Constructors

new(client : Client)
Source

Instance methods

add_last_seen_signature(signature : Bytes)

Add a received message signature to the last seen list

Source
increment_message_count

Increment message count (used when receiving messages from server)

Source
public_key_bytes

Get public key bytes for server authentication (if needed)

Source
reset_session

Reset chat session (useful for reconnections)

Source
send_chat(message : String) : Bool

Send chat message or command, automatically determining the correct method based on the message content and protocol version

Source
send_command(command : String) : Bool

Send a command with proper signing

Source
send_message(message : String) : Bool

Send a regular chat message with proper signing and acknowledgment

Source