From 21e3f73c23d750995a1bf715fe6191584cf4064d Mon Sep 17 00:00:00 2001 From: mat Date: Thu, 23 Feb 2023 18:46:41 -0600 Subject: [PATCH] check entity for retroactively_add_game_profile_component --- azalea-client/src/player.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azalea-client/src/player.rs b/azalea-client/src/player.rs index 3680e2d0..8bccedc8 100755 --- a/azalea-client/src/player.rs +++ b/azalea-client/src/player.rs @@ -36,9 +36,9 @@ pub fn retroactively_add_game_profile_component( ) { for event in events.iter() { if let Some(entity) = entity_infos.get_entity_by_uuid(&event.info.uuid) { - commands - .entity(entity) - .insert(GameProfileComponent(event.info.profile.clone())); + if let Some(mut entity_commands) = commands.get_entity(entity) { + entity_commands.insert(GameProfileComponent(event.info.profile.clone())); + } } } }