From 2c8b7c5c2c9297273abfba8f7743f1bc25f166b1 Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 28 Sep 2025 13:10:04 -0545 Subject: upgrade bevy to 0.17.0-rc.2 --- azalea-client/src/plugins/disconnect.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'azalea-client/src/plugins/disconnect.rs') diff --git a/azalea-client/src/plugins/disconnect.rs b/azalea-client/src/plugins/disconnect.rs index 3cb9e82a..95950ae9 100644 --- a/azalea-client/src/plugins/disconnect.rs +++ b/azalea-client/src/plugins/disconnect.rs @@ -19,7 +19,7 @@ use crate::{ pub struct DisconnectPlugin; impl Plugin for DisconnectPlugin { fn build(&self, app: &mut App) { - app.add_event::().add_systems( + app.add_message::().add_systems( PostUpdate, ( update_read_packets_task_running_component, @@ -45,7 +45,7 @@ impl Plugin for DisconnectPlugin { /// /// [`ConnectionFailedEvent`]: crate::join::ConnectionFailedEvent -#[derive(Event)] +#[derive(Message)] pub struct DisconnectEvent { pub entity: Entity, pub reason: Option, @@ -82,7 +82,7 @@ pub struct RemoveOnDisconnectBundle { /// a [`DisconnectEvent`]. pub fn remove_components_from_disconnected_players( mut commands: Commands, - mut events: EventReader, + mut events: MessageReader, mut loaded_by_query: Query<&mut azalea_entity::LoadedBy>, ) { for DisconnectEvent { entity, reason } in events.read() { @@ -125,7 +125,7 @@ fn update_read_packets_task_running_component( #[allow(clippy::type_complexity)] fn disconnect_on_connection_dead( query: Query<(Entity, &IsConnectionAlive), (Changed, With)>, - mut disconnect_events: EventWriter, + mut disconnect_events: MessageWriter, ) { for (entity, &is_connection_alive) in &query { if !*is_connection_alive { -- cgit v1.2.3