aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/disconnect.rs
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-client/src/disconnect.rs')
-rw-r--r--azalea-client/src/disconnect.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/azalea-client/src/disconnect.rs b/azalea-client/src/disconnect.rs
index 5b377ce2..06648691 100644
--- a/azalea-client/src/disconnect.rs
+++ b/azalea-client/src/disconnect.rs
@@ -1,7 +1,7 @@
//! Disconnect a client from the server.
use azalea_chat::FormattedText;
-use azalea_entity::LocalEntity;
+use azalea_entity::{EntityBundle, LocalEntity};
use bevy_app::{App, Plugin, PostUpdate};
use bevy_ecs::{
component::Component,
@@ -50,6 +50,7 @@ pub fn remove_components_from_disconnected_players(
commands
.entity(*entity)
.remove::<JoinedClientBundle>()
+ .remove::<EntityBundle>()
// this makes it close the tcp connection
.remove::<RawConnection>()
// swarm detects when this tx gets dropped to fire SwarmEvent::Disconnect