aboutsummaryrefslogtreecommitdiff
path: root/azalea/src
diff options
context:
space:
mode:
Diffstat (limited to 'azalea/src')
-rw-r--r--azalea/src/swarm/mod.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/azalea/src/swarm/mod.rs b/azalea/src/swarm/mod.rs
index ba38a17e..66e5ea23 100644
--- a/azalea/src/swarm/mod.rs
+++ b/azalea/src/swarm/mod.rs
@@ -547,9 +547,11 @@ impl Swarm {
}
}
cloned_bots.lock().remove(&bot.entity);
- let owned_account = cloned_bot.component::<Account>();
+ let account = cloned_bot
+ .get_component::<Account>()
+ .expect("bot is missing required Account component");
swarm_tx
- .send(SwarmEvent::Disconnect(Box::new(owned_account)))
+ .send(SwarmEvent::Disconnect(Box::new(account)))
.unwrap();
});