aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets/login/serverbound_hello_packet.rs
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-protocol/src/packets/login/serverbound_hello_packet.rs')
-rwxr-xr-xazalea-protocol/src/packets/login/serverbound_hello_packet.rs24
1 files changed, 2 insertions, 22 deletions
diff --git a/azalea-protocol/src/packets/login/serverbound_hello_packet.rs b/azalea-protocol/src/packets/login/serverbound_hello_packet.rs
index a72480f2..eb6a4065 100755
--- a/azalea-protocol/src/packets/login/serverbound_hello_packet.rs
+++ b/azalea-protocol/src/packets/login/serverbound_hello_packet.rs
@@ -1,27 +1,7 @@
+use packet_macros::LoginPacket;
use std::hash::Hash;
-use crate::mc_buf::Writable;
-
-use super::LoginPacket;
-
-#[derive(Hash, Clone, Debug)]
+#[derive(Hash, Clone, Debug, LoginPacket)]
pub struct ServerboundHelloPacket {
pub username: String,
}
-
-impl ServerboundHelloPacket {
- pub fn get(self) -> LoginPacket {
- LoginPacket::ServerboundHelloPacket(self)
- }
-
- pub fn write(&self, buf: &mut Vec<u8>) -> Result<(), std::io::Error> {
- buf.write_utf(&self.username).unwrap();
- Ok(())
- }
-
- pub async fn read<T: tokio::io::AsyncRead + std::marker::Unpin + std::marker::Send>(
- _buf: &mut T,
- ) -> Result<LoginPacket, String> {
- Err("ServerboundHelloPacket::read not implemented".to_string())
- }
-}