From 8af265e48bf9f3d5263c074d034770e4216bb3f3 Mon Sep 17 00:00:00 2001 From: mat Date: Tue, 25 Mar 2025 05:16:10 +0000 Subject: PongPlugin --- azalea-client/src/plugins/packet/config/mod.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'azalea-client/src/plugins/packet/config/mod.rs') diff --git a/azalea-client/src/plugins/packet/config/mod.rs b/azalea-client/src/plugins/packet/config/mod.rs index c9b84eac..ae601793 100644 --- a/azalea-client/src/plugins/packet/config/mod.rs +++ b/azalea-client/src/plugins/packet/config/mod.rs @@ -142,10 +142,8 @@ impl ConfigPacketHandler<'_> { pub fn ping(&mut self, p: ClientboundPing) { debug!("Got ping packet (in configuration) {p:?}"); - as_system::>(self.ecs, |query| { - let raw_conn = query.get(self.player).unwrap(); - - raw_conn.write_packet(ServerboundPong { id: p.id }).unwrap(); + as_system::(self.ecs, |mut commands| { + commands.trigger_targets(ConfigPingEvent(p), self.player); }); } -- cgit v1.2.3