Skip to content

Commit

Permalink
fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
1zun4 committed Jan 6, 2024
1 parent 7890341 commit 994136c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
10 changes: 1 addition & 9 deletions azalea-client/src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use crate::{
AddPlayerEvent, DeathEvent, KeepAliveEvent, PacketEvent, RemovePlayerEvent,
UpdatePlayerEvent,
},
PlayerInfo, disconnect::DisconnectEvent,
PlayerInfo,
};

// (for contributors):
Expand Down Expand Up @@ -233,11 +233,3 @@ fn disconnect_listener(query: Query<&LocalPlayerEvents>, mut events: EventReader
}
}
}

fn disconnect_listener(query: Query<&LocalPlayerEvents>, mut events: EventReader<DisconnectEvent>) {
for event in events.read() {
if let Ok(local_player_events) = query.get(event.entity) {
let _ = local_player_events.send(Event::Disconnect(event.reason.clone()));
}
}
}
4 changes: 3 additions & 1 deletion azalea-client/src/packet_handling/configuration.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use std::io::Cursor;
use std::sync::Arc;

use azalea_chat::FormattedText;
use azalea_chat::text_component::TextComponent;
use azalea_entity::indexing::EntityIdIndex;
use azalea_protocol::packets::configuration::serverbound_finish_configuration_packet::ServerboundFinishConfigurationPacket;
use azalea_protocol::packets::configuration::serverbound_keep_alive_packet::ServerboundKeepAlivePacket;
Expand Down Expand Up @@ -115,7 +117,7 @@ pub fn process_packet_events(ecs: &mut World) {
let mut disconnect_events = system_state.get_mut(ecs);
disconnect_events.send(DisconnectEvent {
entity: player_entity,
reason: Some(reason),
reason: Some(FormattedText::Text(TextComponent::new(reason))),
});
}
}
Expand Down
4 changes: 0 additions & 4 deletions azalea-client/src/packet_handling/game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -406,11 +406,7 @@ pub fn process_packet_events(ecs: &mut World) {
let mut disconnect_events = system_state.get_mut(ecs);
disconnect_events.send(DisconnectEvent {
entity: player_entity,
<<<<<<< HEAD
reason: Some(p.reason.to_ansi()),
=======
reason: Some(p.reason.clone()),
>>>>>>> socks5
});
}
ClientboundGamePacket::UpdateRecipes(_p) => {
Expand Down

0 comments on commit 994136c

Please sign in to comment.