aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-protocol/src/packets/mod.rs')
-rwxr-xr-xazalea-protocol/src/packets/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/azalea-protocol/src/packets/mod.rs b/azalea-protocol/src/packets/mod.rs
index 24a1437c..5f28e340 100755
--- a/azalea-protocol/src/packets/mod.rs
+++ b/azalea-protocol/src/packets/mod.rs
@@ -44,6 +44,12 @@ where
{
fn id(&self) -> u32;
+ /// Returns Mojang's resource name for the packet.
+ ///
+ /// This doesn't include the "minecraft:" prefix, it just returns a string
+ /// like `pong`.
+ fn name(&self) -> &'static str;
+
/// Read a packet by its id, `ConnectionProtocol`, and flow
fn read(id: u32, buf: &mut Cursor<&[u8]>) -> Result<Self, Box<ReadPacketError>>;