use bytes::Buf; use pumpkin_data::packet::serverbound::LOGIN_HELLO; use pumpkin_macros::server_packet; use crate::{ ServerPacket, bytebuf::{ByteBuf, ReadingError}, }; #[server_packet(LOGIN_HELLO)] pub struct SLoginStart { pub name: String, // 16 pub uuid: uuid::Uuid, } impl ServerPacket for SLoginStart { fn read(bytebuf: &mut impl Buf) -> Result { Ok(Self { name: bytebuf.try_get_string_len(16)?, uuid: bytebuf.try_get_uuid()?, }) } }