aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/packet_handling
diff options
context:
space:
mode:
author1zuna <1zuna@ccbluex.net>2023-12-02 05:45:12 +0100
committerGitHub <noreply@github.com>2023-12-01 22:45:12 -0600
commitfbee81e609e0cbc1bb8aff8ae649bca4e44ae465 (patch)
tree4e24226ebf0700f20036ded11ad2c3fdb1c09572 /azalea-client/src/packet_handling
parentd21e496bc36624900d771dacefcbe67dc8110c06 (diff)
downloadazalea-drasl-fbee81e609e0cbc1bb8aff8ae649bca4e44ae465.tar.xz
addd disconnect reason (#114)
Diffstat (limited to 'azalea-client/src/packet_handling')
-rw-r--r--azalea-client/src/packet_handling/configuration.rs1
-rw-r--r--azalea-client/src/packet_handling/game.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/azalea-client/src/packet_handling/configuration.rs b/azalea-client/src/packet_handling/configuration.rs
index ab0ce089..82016fe6 100644
--- a/azalea-client/src/packet_handling/configuration.rs
+++ b/azalea-client/src/packet_handling/configuration.rs
@@ -104,6 +104,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(p.reason.to_ansi()),
});
}
ClientboundConfigurationPacket::FinishConfiguration(p) => {
diff --git a/azalea-client/src/packet_handling/game.rs b/azalea-client/src/packet_handling/game.rs
index 9f7c5e69..db8da69a 100644
--- a/azalea-client/src/packet_handling/game.rs
+++ b/azalea-client/src/packet_handling/game.rs
@@ -401,6 +401,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(p.reason.to_ansi()),
});
}
ClientboundGamePacket::UpdateRecipes(_p) => {