22 lines
457 B
Rust
22 lines
457 B
Rust
use pumpkin_macros::packet;
|
|
|
|
use crate::{
|
|
bytebuf::{ByteBuffer, DeserializerError},
|
|
ServerPacket, VarInt,
|
|
};
|
|
|
|
#[packet(0x00)]
|
|
pub struct SLoginStart {
|
|
pub name: String, // 16
|
|
pub uuid: uuid::Uuid,
|
|
}
|
|
|
|
impl ServerPacket for SLoginStart {
|
|
fn read(bytebuf: &mut ByteBuffer) -> Result<Self, DeserializerError> {
|
|
Ok(Self {
|
|
name: bytebuf.get_string_len(16).unwrap(),
|
|
uuid: bytebuf.get_uuid(),
|
|
})
|
|
}
|
|
}
|