aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/plugins/packet/config/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-client/src/plugins/packet/config/mod.rs')
-rw-r--r--azalea-client/src/plugins/packet/config/mod.rs6
1 files changed, 2 insertions, 4 deletions
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::<Query<&RawConnection>>(self.ecs, |query| {
- let raw_conn = query.get(self.player).unwrap();
-
- raw_conn.write_packet(ServerboundPong { id: p.id }).unwrap();
+ as_system::<Commands>(self.ecs, |mut commands| {
+ commands.trigger_targets(ConfigPingEvent(p), self.player);
});
}