aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/packet_handling
diff options
context:
space:
mode:
authorShayne Hartford <shaybox@shaybox.com>2023-12-04 15:26:53 -0500
committerGitHub <noreply@github.com>2023-12-04 14:26:53 -0600
commit888c2765037711f45a6dac8d8bad70dc9ee70998 (patch)
treea1c72393b53fc5875713640ffa499f0f2b4d2483 /azalea-client/src/packet_handling
parentcc976c6873e3a0764a36b5950aba0f0767269d2f (diff)
downloadazalea-drasl-888c2765037711f45a6dac8d8bad70dc9ee70998.tar.xz
Add masked chat type/event (#118)
Diffstat (limited to 'azalea-client/src/packet_handling')
-rw-r--r--azalea-client/src/packet_handling/game.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/azalea-client/src/packet_handling/game.rs b/azalea-client/src/packet_handling/game.rs
index 20facadb..6c4ea4f4 100644
--- a/azalea-client/src/packet_handling/game.rs
+++ b/azalea-client/src/packet_handling/game.rs
@@ -1382,7 +1382,18 @@ pub fn process_packet_events(ecs: &mut World) {
ClientboundGamePacket::TabList(_) => {}
ClientboundGamePacket::TagQuery(_) => {}
ClientboundGamePacket::TakeItemEntity(_) => {}
- ClientboundGamePacket::DisguisedChat(_) => {}
+ ClientboundGamePacket::MaskedChat(p) => {
+ debug!("Got masked chat packet {p:?}");
+
+ let mut system_state: SystemState<EventWriter<ChatReceivedEvent>> =
+ SystemState::new(ecs);
+ let mut chat_events = system_state.get_mut(ecs);
+
+ chat_events.send(ChatReceivedEvent {
+ entity: player_entity,
+ packet: ChatPacket::Masked(Arc::new(p.clone())),
+ });
+ }
ClientboundGamePacket::Bundle(_) => {}
ClientboundGamePacket::DamageEvent(_) => {}
ClientboundGamePacket::HurtAnimation(_) => {}