aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets/game/clientbound_declare_commands_packet.rs
blob: 1bcf0dd49b3b0def30978617777647e8fcf32a41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// use std::hash::Hash;

// use crate::mc_buf::Readable;

// use super::LoginPacket;

// #[derive(Hash, Clone, Debug)]
// pub struct ClientboundDeclareCommandsPacket {
//     pub root: RootCommandNode<SharedSuggestionProvider>,
//     pub public_key: Vec<u8>,
//     pub nonce: Vec<u8>,
// }

// impl ClientboundHelloPacket {
//     pub fn get(self) -> LoginPacket {
//         LoginPacket::ClientboundHelloPacket(self)
//     }

//     pub fn write(&self, _buf: &mut Vec<u8>) -> Result<(), std::io::Error> {
//         panic!("ClientboundHelloPacket::write not implemented")
//     }

//     pub async fn read<T: tokio::io::AsyncRead + std::marker::Unpin + std::marker::Send>(
//         buf: &mut T,
//     ) -> Result<LoginPacket, String> {
//         let server_id = buf.read_utf_with_len(20).await?;
//         let public_key = buf.read_byte_array().await?;
//         let nonce = buf.read_byte_array().await?;

//         Ok(ClientboundHelloPacket {
//             server_id,
//             public_key,
//             nonce,
//         }
//         .get())
//     }
// }