diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2023-07-09 19:11:29 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-09 19:11:29 -0500 |
| commit | d1afd02aa84e7b4450c1607277f078eb2a0f1bf3 (patch) | |
| tree | efea9bb7ef7f2064f7c963fd88f394fecec6231b /azalea-client/src/disconnect.rs | |
| parent | ea8a8fccb6eb39c97f6cb69e11db5f7d0886172e (diff) | |
| download | azalea-drasl-d1afd02aa84e7b4450c1607277f078eb2a0f1bf3.tar.xz | |
Update to Bevy 0.11 (#94)
* update to bevy 0.11
* clippy
---------
Co-authored-by: mat <git@matdoes.dev>
Diffstat (limited to 'azalea-client/src/disconnect.rs')
| -rw-r--r-- | azalea-client/src/disconnect.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/azalea-client/src/disconnect.rs b/azalea-client/src/disconnect.rs index 3b8d133e..10aef7ba 100644 --- a/azalea-client/src/disconnect.rs +++ b/azalea-client/src/disconnect.rs @@ -1,10 +1,11 @@ //! Disconnect a client from the server. -use bevy_app::{App, CoreSet, Plugin}; +use bevy_app::{App, Plugin, PostUpdate}; use bevy_ecs::{ component::Component, entity::Entity, event::{EventReader, EventWriter}, + prelude::Event, query::Changed, schedule::IntoSystemConfigs, system::{Commands, Query}, @@ -17,18 +18,19 @@ pub struct DisconnectPlugin; impl Plugin for DisconnectPlugin { fn build(&self, app: &mut App) { app.add_event::<DisconnectEvent>().add_systems( + PostUpdate, ( update_read_packets_task_running_component, disconnect_on_read_packets_ended, remove_components_from_disconnected_players, ) - .in_base_set(CoreSet::PostUpdate) .chain(), ); } } /// An event sent when a client is getting disconnected. +#[derive(Event)] pub struct DisconnectEvent { pub entity: Entity, } |
