diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2022-04-20 01:34:12 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-20 01:34:12 +0000 |
| commit | 5fd87615cf1514c7f9a0358988964768ded3f06e (patch) | |
| tree | 001c3c760fdae8fe7b72cacb1f87d3703cc4e82c /azalea-protocol/src/packets/game | |
| parent | d09762f5d38ab1200fb08ca3b1178813b4e47081 (diff) | |
| parent | be194c1ca136100fd8f53ed068d82c9f7ae32870 (diff) | |
| download | azalea-drasl-5fd87615cf1514c7f9a0358988964768ded3f06e.tar.xz | |
Merge pull request #1 from mat-1/brigadier
azalea-brigadier
Diffstat (limited to 'azalea-protocol/src/packets/game')
| -rw-r--r-- | azalea-protocol/src/packets/game/clientbound_declare_commands_packet.rs | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/azalea-protocol/src/packets/game/clientbound_declare_commands_packet.rs b/azalea-protocol/src/packets/game/clientbound_declare_commands_packet.rs new file mode 100644 index 00000000..1bcf0dd4 --- /dev/null +++ b/azalea-protocol/src/packets/game/clientbound_declare_commands_packet.rs @@ -0,0 +1,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()) +// } +// } |
