aboutsummaryrefslogtreecommitdiff
path: root/minecraft-protocol/src/connection.rs
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2021-12-11 15:17:42 -0600
committermat <github@matdoes.dev>2021-12-11 15:17:42 -0600
commitba911a8a207eb47df7a055410570767b2e33c2ae (patch)
tree4a53d384f08b7272ba287bdb326f3d7fcb09f289 /minecraft-protocol/src/connection.rs
parent6026c74430f311c9217b77e7ac07d183efde5bce (diff)
downloadazalea-drasl-ba911a8a207eb47df7a055410570767b2e33c2ae.tar.xz
correct minecraft-chat :tada:
Diffstat (limited to 'minecraft-protocol/src/connection.rs')
-rw-r--r--minecraft-protocol/src/connection.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/minecraft-protocol/src/connection.rs b/minecraft-protocol/src/connection.rs
index cfca403c..2fe03dfb 100644
--- a/minecraft-protocol/src/connection.rs
+++ b/minecraft-protocol/src/connection.rs
@@ -45,7 +45,7 @@ impl Connection {
self.state = state;
}
- pub async fn read_packet(&mut self) -> Result<(), String> {
+ pub async fn read_packet(&mut self) -> Result<Packet, String> {
// what this does:
// 1. reads the first 5 bytes, probably only some of this will be used to get the packet length
// 2. how much we should read = packet length - 5
@@ -69,9 +69,7 @@ impl Connection {
)
.await?;
- println!("packet: {:?}", packet);
-
- Ok(())
+ Ok(packet)
}
/// Write a packet to the server