aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs
blob: e6941f252d9728ff0fb6c0dc2bb20dfbb95726a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use azalea_chat::component::Component;
use azalea_crypto::SaltSignaturePair;
use packet_macros::{GamePacket, McBuf};

#[derive(Clone, Debug, McBuf, GamePacket)]
pub struct ClientboundPlayerChatPacket {
    pub signed_content: Component,
    pub unsigned_content: Option<Component>,
    #[var]
    pub type_id: i32,
    pub sender: ChatSender,
    pub timestamp: u64,
    pub salt_signature: SaltSignaturePair,
}

#[derive(Clone, Debug, McBuf)]
pub struct ChatSender {
    pub uuid: uuid::Uuid,
    pub name: Component,
    pub team_name: Option<Component>,
}