class
Rosegold::Clientbound::PlayerChatMessage
- Rosegold::Clientbound::PlayerChatMessage
- Rosegold::Clientbound::Packet
- Rosegold::Packet
- Rosegold::Event
- Reference
- Object
Included Modules
Defined in:
rosegold/packets/clientbound/player_chat_message.crConstant Summary
-
PROTOCOL_PACKET_IDS =
{772_u32 => 58_u8}
-
Store the protocol mappings as a constant
Constructors
Class Method Summary
- .[](protocol_version : UInt32) : UInt8
-
.default_packet_id : UInt8
Define default packet ID (typically the latest/most common version)
-
.packet_id : UInt8
Provide backward compatibility with existing packet_id class getter Use the first protocol's packet ID for registration compatibility
-
.packet_id_for_protocol(protocol_version : UInt32) : UInt8
Get packet ID for specific protocol version
- .read(packet)
-
.supported_protocols : Array(UInt32)
Helper method to get all supported protocols
-
.supports_protocol?(protocol_version : UInt32) : Bool
Helper method to check if a protocol is supported
Instance Method Summary
- #callback(client)
- #chat_type : UInt32
- #chat_type=(chat_type : UInt32)
- #filter_mask : Bytes | Nil
- #filter_mask=(filter_mask : Bytes | Nil)
- #filter_type : UInt32
- #filter_type=(filter_type : UInt32)
- #global_index : UInt32
- #global_index=(global_index : UInt32)
- #index : UInt32
- #index=(index : UInt32)
- #message : String
- #message=(message : String)
- #network_name : Rosegold::Chat
- #network_name=(network_name : Rosegold::Chat)
- #network_target_name : Rosegold::Chat | Nil
- #network_target_name=(network_target_name : Rosegold::Chat | Nil)
- #previous_messages : Array(Bytes)
- #previous_messages=(previous_messages : Array(Bytes))
- #salt : Int64
- #salt=(salt : Int64)
- #sender : UUID
- #sender=(sender : UUID)
- #signature : Bytes | Nil
- #signature=(signature : Bytes | Nil)
- #timestamp : Int64
- #timestamp=(timestamp : Int64)
- #unsigned_content : Rosegold::Chat | Nil
- #unsigned_content=(unsigned_content : Rosegold::Chat | Nil)
- #write : Bytes
Macros inherited from module Rosegold::Packets::ProtocolMapping
packet_ids(mappings)
packet_ids
Class methods inherited from class Rosegold::Clientbound::Packet
new_raw(bytes)
new_raw,
state
state
Instance methods inherited from class Rosegold::Packet
callback(client_or_server)
callback,
to_s(io)
to_s,
write : Bytes
write
Constructor Detail
def self.new(global_index : UInt32, sender : UUID, index : UInt32, signature : Slice(UInt8) | Nil, message : String, timestamp : Int64, salt : Int64, previous_messages : Array(Slice(UInt8)), unsigned_content : Nil | Rosegold::Chat, filter_type : UInt32, filter_mask : Slice(UInt8) | Nil, chat_type : UInt32, network_name : Rosegold::Chat, network_target_name : Nil | Rosegold::Chat)
#
Class Method Detail
def self.[](protocol_version : UInt32) : UInt8
#
def self.default_packet_id : UInt8
#
Define default packet ID (typically the latest/most common version)
def self.packet_id : UInt8
#
Provide backward compatibility with existing packet_id class getter Use the first protocol's packet ID for registration compatibility
def self.packet_id_for_protocol(protocol_version : UInt32) : UInt8
#
Get packet ID for specific protocol version
def self.supports_protocol?(protocol_version : UInt32) : Bool
#
Helper method to check if a protocol is supported