From 75efbc83fdc4a47f880e95259a339d41839af01a Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 19 Mar 2025 21:35:47 +0000 Subject: make SendPacketEvent a bevy trigger --- azalea-client/src/plugins/respawn.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'azalea-client/src/plugins/respawn.rs') diff --git a/azalea-client/src/plugins/respawn.rs b/azalea-client/src/plugins/respawn.rs index 5797406b..24479805 100644 --- a/azalea-client/src/plugins/respawn.rs +++ b/azalea-client/src/plugins/respawn.rs @@ -20,12 +20,9 @@ impl Plugin for RespawnPlugin { } } -pub fn perform_respawn( - mut events: EventReader, - mut send_packets: EventWriter, -) { +pub fn perform_respawn(mut events: EventReader, mut commands: Commands) { for event in events.read() { - send_packets.send(SendPacketEvent::new( + commands.trigger(SendPacketEvent::new( event.entity, ServerboundClientCommand { action: s_client_command::Action::PerformRespawn, -- cgit v1.2.3