diff options
| author | mat <github@matdoes.dev> | 2022-07-21 20:04:33 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-07-21 20:04:33 -0500 |
| commit | c0ca03204f1c507d15ccb2699b69d08bd160139f (patch) | |
| tree | 6029dd02a26c3b8a087fa4fe7d8d2c0592585fa5 /azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs | |
| parent | ec0b6ec06c1607d7bfc9df2fca220f59c700e07b (diff) | |
| download | azalea-drasl-c0ca03204f1c507d15ccb2699b69d08bd160139f.tar.xz | |
1.19.1-rc2
Diffstat (limited to 'azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs')
| -rw-r--r-- | azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs b/azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs index f5df8869..1b71ccea 100644 --- a/azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs @@ -17,7 +17,8 @@ pub enum ChatType { MsgCommandIncoming = 2, MsgCommandOutgoing = 3, TeamMsgCommandIncoming = 4, - EmoteCommand = 5, + TeamMsgCommandOutgoing = 5, + EmoteCommand = 6, } #[derive(Clone, Debug, McBuf)] @@ -37,14 +38,27 @@ pub struct PlayerChatMessage { #[derive(Clone, Debug, McBuf)] pub struct SignedMessageBody { - pub content: Component, + pub content: ChatMessageContent, pub timestamp: u64, pub salt: u64, - pub last_seen: Vec<LastSeen>, + pub last_seen: Vec<LastSeenMessagesEntry>, } #[derive(Clone, Debug, McBuf)] -pub struct LastSeen { +pub struct LastSeenMessagesEntry { pub profile_id: Uuid, pub last_signature: MessageSignature, } + +#[derive(Clone, Debug, McBuf)] +pub struct LastSeenMessagesUpdate { + pub last_seen: Vec<LastSeenMessagesEntry>, + pub last_received: Option<LastSeenMessagesEntry>, +} + +#[derive(Clone, Debug, McBuf)] +pub struct ChatMessageContent { + pub plain: String, + /// Only sent if the decorated message is different than the plain. + pub decorated: Option<Component>, +} |
