aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/plugins/join.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-09-28 13:10:04 -0545
committermat <git@matdoes.dev>2025-09-28 13:10:04 -0545
commit2c8b7c5c2c9297273abfba8f7743f1bc25f166b1 (patch)
tree3d3aded400100c136287fa59293ce26c61644d00 /azalea-client/src/plugins/join.rs
parente2ed19c1ed92f0dccc881d835d9ac6e0f7f834c0 (diff)
downloadazalea-drasl-2c8b7c5c2c9297273abfba8f7743f1bc25f166b1.tar.xz
upgrade bevy to 0.17.0-rc.2
Diffstat (limited to 'azalea-client/src/plugins/join.rs')
-rw-r--r--azalea-client/src/plugins/join.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/azalea-client/src/plugins/join.rs b/azalea-client/src/plugins/join.rs
index ed2d6ed3..b9878370 100644
--- a/azalea-client/src/plugins/join.rs
+++ b/azalea-client/src/plugins/join.rs
@@ -30,8 +30,8 @@ use crate::{
pub struct JoinPlugin;
impl Plugin for JoinPlugin {
fn build(&self, app: &mut App) {
- app.add_event::<StartJoinServerEvent>()
- .add_event::<ConnectionFailedEvent>()
+ app.add_message::<StartJoinServerEvent>()
+ .add_message::<ConnectionFailedEvent>()
.add_systems(
Update,
(
@@ -47,7 +47,7 @@ impl Plugin for JoinPlugin {
///
/// This won't do anything if a client with the Account UUID is already
/// connected to the server.
-#[derive(Event, Debug)]
+#[derive(Message, Debug)]
pub struct StartJoinServerEvent {
pub account: Account,
pub connect_opts: ConnectOpts,
@@ -74,7 +74,7 @@ pub struct ConnectOpts {
/// This isn't sent if we're kicked later, see [`DisconnectEvent`].
///
/// [`DisconnectEvent`]: crate::disconnect::DisconnectEvent
-#[derive(Event)]
+#[derive(Message)]
pub struct ConnectionFailedEvent {
pub entity: Entity,
pub error: ConnectionError,
@@ -82,7 +82,7 @@ pub struct ConnectionFailedEvent {
pub fn handle_start_join_server_event(
mut commands: Commands,
- mut events: EventReader<StartJoinServerEvent>,
+ mut events: MessageReader<StartJoinServerEvent>,
mut entity_uuid_index: ResMut<EntityUuidIndex>,
connection_query: Query<&RawConnection>,
) {
@@ -184,7 +184,7 @@ pub struct CreateConnectionTask(pub Task<Result<LoginConn, ConnectionError>>);
pub fn poll_create_connection_task(
mut commands: Commands,
mut query: Query<(Entity, &mut CreateConnectionTask, &Account)>,
- mut connection_failed_events: EventWriter<ConnectionFailedEvent>,
+ mut connection_failed_events: MessageWriter<ConnectionFailedEvent>,
) {
for (entity, mut task, account) in query.iter_mut() {
if let Some(poll_res) = future::block_on(future::poll_once(&mut task.0)) {