chunkedge_protocol/packets/login/
custom_query_s2c.rs

1use std::borrow::Cow;
2
3use chunkedge_binary::{Bounded, Decode, Encode, RawBytes, VarInt};
4use chunkedge_ident::Ident;
5
6use crate::{Packet, PacketState};
7
8#[derive(Clone, Debug, Encode, Decode, Packet)]
9#[packet(state = PacketState::Login)]
10/// Sent by the server to the client to send a custom message.
11pub struct CustomQueryS2c<'a> {
12    pub message_id: VarInt,
13    pub channel: Ident<Cow<'a, str>>,
14    pub data: Bounded<RawBytes<'a>, 1048576>,
15}