From 7b7b12223205d5df21a31ae8e6fcd7ad69bd7cb4 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 28 Mar 2026 15:07:52 -1100 Subject: re-export azalea-chat from azalea, and rename azalea::chat to client_chat --- azalea-client/src/plugins/chat/handler.rs | 119 ----------- azalea-client/src/plugins/chat/mod.rs | 243 ----------------------- azalea-client/src/plugins/chat_signing.rs | 4 +- azalea-client/src/plugins/client_chat/handler.rs | 119 +++++++++++ azalea-client/src/plugins/client_chat/mod.rs | 243 +++++++++++++++++++++++ azalea-client/src/plugins/mod.rs | 4 +- azalea-client/src/plugins/packet/game/mod.rs | 2 +- azalea-client/src/plugins/packet/mod.rs | 2 +- 8 files changed, 368 insertions(+), 368 deletions(-) delete mode 100644 azalea-client/src/plugins/chat/handler.rs delete mode 100644 azalea-client/src/plugins/chat/mod.rs create mode 100644 azalea-client/src/plugins/client_chat/handler.rs create mode 100644 azalea-client/src/plugins/client_chat/mod.rs (limited to 'azalea-client/src/plugins') diff --git a/azalea-client/src/plugins/chat/handler.rs b/azalea-client/src/plugins/chat/handler.rs deleted file mode 100644 index 703a9846..00000000 --- a/azalea-client/src/plugins/chat/handler.rs +++ /dev/null @@ -1,119 +0,0 @@ -use std::time::{SystemTime, UNIX_EPOCH}; - -use azalea_protocol::packets::{ - Packet, - game::{ServerboundChat, ServerboundChatCommand, s_chat::LastSeenMessagesUpdate}, -}; -use bevy_ecs::prelude::*; - -use super::ChatKind; -use crate::packet::game::SendGamePacketEvent; -#[cfg(feature = "online-mode")] -use crate::{account::Account, chat_signing::ChatSigningSession}; - -/// Send a chat packet to the server of a specific kind (chat message or -/// command). Usually you just want [`SendChatEvent`] instead. -/// -/// Usually setting the kind to `Message` will make it send a chat message even -/// if it starts with a slash, but some server implementations will always do a -/// command if it starts with a slash. -/// -/// If you're wondering why this isn't two separate events, it's so ordering is -/// preserved if multiple chat messages and commands are sent at the same time. -/// -/// [`SendChatEvent`]: super::SendChatEvent -#[derive(Message)] -pub struct SendChatKindEvent { - pub entity: Entity, - pub content: String, - pub kind: ChatKind, -} - -pub fn handle_send_chat_kind_event( - mut events: MessageReader, - mut commands: Commands, - #[cfg(feature = "online-mode")] mut query: Query<(&Account, &mut ChatSigningSession)>, -) { - for event in events.read() { - let content = event - .content - .chars() - .filter(|c| !matches!(c, '\x00'..='\x1F' | '\x7F' | '§')) - .take(256) - .collect::(); - - let timestamp = SystemTime::now(); - - let packet = match event.kind { - ChatKind::Message => { - let salt = azalea_crypto::signing::make_salt(); - - #[cfg(feature = "online-mode")] - let signature = if let Ok((account, mut chat_session)) = query.get_mut(event.entity) - { - Some(create_signature( - account, - &mut chat_session, - salt, - timestamp, - &content, - )) - } else { - None - }; - #[cfg(not(feature = "online-mode"))] - let signature = None; - - ServerboundChat { - message: content, - timestamp: timestamp - .duration_since(UNIX_EPOCH) - .expect("Time shouldn't be before epoch") - .as_millis() - .try_into() - .expect("Instant should fit into a u64"), - salt, - signature, - // TODO: implement last_seen_messages - last_seen_messages: LastSeenMessagesUpdate::default(), - } - } - .into_variant(), - ChatKind::Command => { - // TODO: commands that require chat signing - ServerboundChatCommand { command: content }.into_variant() - } - }; - - commands.trigger(SendGamePacketEvent::new(event.entity, packet)); - } -} - -#[cfg(feature = "online-mode")] -pub fn create_signature( - account: &Account, - chat_session: &mut ChatSigningSession, - salt: u64, - timestamp: SystemTime, - message: &str, -) -> azalea_crypto::signing::MessageSignature { - use azalea_crypto::signing::SignChatMessageOptions; - - let certs = account - .certs() - .expect("certs shouldn't be set back to None"); - - let signature = azalea_crypto::signing::sign_chat_message(&SignChatMessageOptions { - account_uuid: account.uuid(), - chat_session_uuid: chat_session.session_id, - message_index: chat_session.messages_sent, - salt, - timestamp, - message: message.to_owned(), - private_key: certs.private_key.clone(), - }); - - chat_session.messages_sent += 1; - - signature -} diff --git a/azalea-client/src/plugins/chat/mod.rs b/azalea-client/src/plugins/chat/mod.rs deleted file mode 100644 index ca247ec4..00000000 --- a/azalea-client/src/plugins/chat/mod.rs +++ /dev/null @@ -1,243 +0,0 @@ -//! Implementations of chat-related features. - -pub mod handler; - -use std::sync::Arc; - -use azalea_chat::FormattedText; -use azalea_protocol::packets::game::{ - c_disguised_chat::ClientboundDisguisedChat, c_player_chat::ClientboundPlayerChat, - c_system_chat::ClientboundSystemChat, -}; -use bevy_app::{App, Plugin, Update}; -use bevy_ecs::prelude::*; -use handler::{SendChatKindEvent, handle_send_chat_kind_event}; -use uuid::Uuid; - -pub struct ChatPlugin; -impl Plugin for ChatPlugin { - fn build(&self, app: &mut App) { - app.add_message::() - .add_message::() - .add_message::() - .add_systems( - Update, - (handle_send_chat_event, handle_send_chat_kind_event).chain(), - ); - } -} - -/// A chat packet, either a system message or a chat message. -#[derive(Clone, Debug, PartialEq)] -pub enum ChatPacket { - System(Arc), - Player(Arc), - Disguised(Arc), -} - -macro_rules! regex { - ($re:literal $(,)?) => {{ - static RE: std::sync::LazyLock = - std::sync::LazyLock::new(|| regex::Regex::new($re).unwrap()); - &RE - }}; -} - -impl ChatPacket { - /// Get the message shown in chat for this packet. - /// - /// See [`Self::split_sender_and_content`] for more details about how this - /// works. - pub fn message(&self) -> FormattedText { - match self { - ChatPacket::System(p) => p.content.clone(), - ChatPacket::Player(p) => p.message(), - ChatPacket::Disguised(p) => p.message(), - } - } - - /// A convenience function to determine the username of the sender and - /// the content of a chat message. - /// - /// This does not preserve formatting codes. - /// - /// This function uses a few checks to attempt to split the chat message, - /// and is intended to work on most servers. It won't work for every server - /// though, so in certain cases you may have to reimplement this yourself. - /// - /// If it's not a player-sent chat message or the sender couldn't be - /// determined, the username part will be None. - /// - /// Also see [`Self::sender`] and [`Self::content`] if you only need one of - /// the parts. - pub fn split_sender_and_content(&self) -> (Option, String) { - match self { - ChatPacket::System(p) => { - let message = p.content.to_string(); - // overlay messages aren't in chat - if p.overlay { - return (None, message); - } - - // it's a system message, so we'll have to match the content with regex - - // username surrounded by angle brackets (vanilla-like chat), and allow username - // prefixes like [Owner] - if let Some(m) = regex!(r"^<(?:\[[^\]]+?\] )?(\w{1,16})> (.+)$").captures(&message) - { - return (Some(m[1].to_string()), m[2].to_string()); - } - // username surrounded by square brackets (essentials whispers, vanilla-like - // /say), and allow username prefixes - if let Some(m) = - regex!(r"^\[(?:\[[^\]]+?\] )?(\w{1,16})(?: -> me)?\] (.+)$").captures(&message) - { - return (Some(m[1].to_string()), m[2].to_string()); - } - // username without angle brackets (2b2t whispers, vanilla-like whispers) - if let Some(m) = - regex!(r"^(\w{1,16}) whispers(?: to you)?: (.+)$").captures(&message) - { - return (Some(m[1].to_string()), m[2].to_string()); - } - // hypixel whispers - if let Some(m) = - regex!(r"^From (?:\[[^\]]+\] )(\w{1,16}): (.+)$").captures(&message) - { - return (Some(m[1].to_string()), m[2].to_string()); - } - - (None, message) - } - ChatPacket::Player(p) => ( - // If it's a player chat packet, then the sender and content - // are already split for us. - Some(p.chat_type.name.to_string()), - p.body.content.clone(), - ), - ChatPacket::Disguised(p) => ( - // disguised chat packets are basically the same as player chat packets but without - // the chat signing things - Some(p.chat_type.name.to_string()), - p.message.to_string(), - ), - } - } - - /// Get the username of the sender of the message. - /// - /// If it's not a player-sent chat message or the sender couldn't be - /// determined, this will be None. - /// - /// See [`Self::split_sender_and_content`] for more details about how this - /// works. - pub fn sender(&self) -> Option { - self.split_sender_and_content().0 - } - - /// Get the UUID of the sender of the message. - /// - /// If it's not a player-sent chat message, this will be None (this is - /// sometimes the case when a server uses a plugin to modify chat - /// messages). - pub fn sender_uuid(&self) -> Option { - match self { - ChatPacket::System(_) => None, - ChatPacket::Player(m) => Some(m.sender), - ChatPacket::Disguised(_) => None, - } - } - - /// Get the content part of the message as a string. - /// - /// This does not preserve formatting codes. If it's not a player-sent chat - /// message or the sender couldn't be determined, this will contain the - /// entire message. - pub fn content(&self) -> String { - self.split_sender_and_content().1 - } - - /// Create a new `ChatPacket` from a string. This is meant to be used as a - /// convenience function for testing. - pub fn new(message: &str) -> Self { - ChatPacket::System(Arc::new(ClientboundSystemChat { - content: FormattedText::from(message), - overlay: false, - })) - } - - /// Whether this message is an incoming whisper message (i.e. someone else - /// messaged the bot with /msg). - /// - /// This is not guaranteed to work correctly on custom servers. - pub fn is_whisper(&self) -> bool { - match self { - ChatPacket::System(p) => { - let message = p.content.to_string(); - if p.overlay { - return false; - } - if regex!(r"^(-> me|\w{1,16} whispers: )").is_match(&message) { - return true; - } - // hypixel - if regex!(r"^From (?:\[[^\]]+\] )?\w{1,16}: ").is_match(&message) { - return true; - } - - false - } - _ => match self.message() { - FormattedText::Text(_) => false, - FormattedText::Translatable(t) => t.key == "commands.message.display.incoming", - }, - } - } -} - -/// A client received a chat message packet. -#[derive(Clone, Debug, Message)] -pub struct ChatReceivedEvent { - pub entity: Entity, - pub packet: ChatPacket, -} - -/// Send a chat message (or command, if it starts with a slash) to the server. -#[derive(Message)] -pub struct SendChatEvent { - pub entity: Entity, - pub content: String, -} - -pub fn handle_send_chat_event( - mut events: MessageReader, - mut send_chat_kind_events: MessageWriter, -) { - for event in events.read() { - if event.content.starts_with('/') { - send_chat_kind_events.write(SendChatKindEvent { - entity: event.entity, - content: event.content[1..].to_string(), - kind: ChatKind::Command, - }); - } else { - send_chat_kind_events.write(SendChatKindEvent { - entity: event.entity, - content: event.content.clone(), - kind: ChatKind::Message, - }); - } - } -} - -/// A kind of chat packet, either a chat message or a command. -pub enum ChatKind { - Message, - Command, -} - -// TODO -// MessageSigner, ChatMessageContent, LastSeenMessages -// fn sign_message() -> MessageSignature { -// MessageSignature::default() -// } diff --git a/azalea-client/src/plugins/chat_signing.rs b/azalea-client/src/plugins/chat_signing.rs index 2de9c6b0..a0404636 100644 --- a/azalea-client/src/plugins/chat_signing.rs +++ b/azalea-client/src/plugins/chat_signing.rs @@ -12,7 +12,7 @@ use chrono::Utc; use tracing::{debug, error}; use uuid::Uuid; -use super::{chat, login::IsAuthenticated, packet::game::SendGamePacketEvent}; +use super::{client_chat, login::IsAuthenticated, packet::game::SendGamePacketEvent}; use crate::{InGameState, account::Account}; pub struct ChatSigningPlugin; @@ -26,7 +26,7 @@ impl Plugin for ChatSigningPlugin { handle_queued_certs_to_send, ) .chain() - .before(chat::handler::handle_send_chat_kind_event), + .before(client_chat::handler::handle_send_chat_kind_event), ); } } diff --git a/azalea-client/src/plugins/client_chat/handler.rs b/azalea-client/src/plugins/client_chat/handler.rs new file mode 100644 index 00000000..703a9846 --- /dev/null +++ b/azalea-client/src/plugins/client_chat/handler.rs @@ -0,0 +1,119 @@ +use std::time::{SystemTime, UNIX_EPOCH}; + +use azalea_protocol::packets::{ + Packet, + game::{ServerboundChat, ServerboundChatCommand, s_chat::LastSeenMessagesUpdate}, +}; +use bevy_ecs::prelude::*; + +use super::ChatKind; +use crate::packet::game::SendGamePacketEvent; +#[cfg(feature = "online-mode")] +use crate::{account::Account, chat_signing::ChatSigningSession}; + +/// Send a chat packet to the server of a specific kind (chat message or +/// command). Usually you just want [`SendChatEvent`] instead. +/// +/// Usually setting the kind to `Message` will make it send a chat message even +/// if it starts with a slash, but some server implementations will always do a +/// command if it starts with a slash. +/// +/// If you're wondering why this isn't two separate events, it's so ordering is +/// preserved if multiple chat messages and commands are sent at the same time. +/// +/// [`SendChatEvent`]: super::SendChatEvent +#[derive(Message)] +pub struct SendChatKindEvent { + pub entity: Entity, + pub content: String, + pub kind: ChatKind, +} + +pub fn handle_send_chat_kind_event( + mut events: MessageReader, + mut commands: Commands, + #[cfg(feature = "online-mode")] mut query: Query<(&Account, &mut ChatSigningSession)>, +) { + for event in events.read() { + let content = event + .content + .chars() + .filter(|c| !matches!(c, '\x00'..='\x1F' | '\x7F' | '§')) + .take(256) + .collect::(); + + let timestamp = SystemTime::now(); + + let packet = match event.kind { + ChatKind::Message => { + let salt = azalea_crypto::signing::make_salt(); + + #[cfg(feature = "online-mode")] + let signature = if let Ok((account, mut chat_session)) = query.get_mut(event.entity) + { + Some(create_signature( + account, + &mut chat_session, + salt, + timestamp, + &content, + )) + } else { + None + }; + #[cfg(not(feature = "online-mode"))] + let signature = None; + + ServerboundChat { + message: content, + timestamp: timestamp + .duration_since(UNIX_EPOCH) + .expect("Time shouldn't be before epoch") + .as_millis() + .try_into() + .expect("Instant should fit into a u64"), + salt, + signature, + // TODO: implement last_seen_messages + last_seen_messages: LastSeenMessagesUpdate::default(), + } + } + .into_variant(), + ChatKind::Command => { + // TODO: commands that require chat signing + ServerboundChatCommand { command: content }.into_variant() + } + }; + + commands.trigger(SendGamePacketEvent::new(event.entity, packet)); + } +} + +#[cfg(feature = "online-mode")] +pub fn create_signature( + account: &Account, + chat_session: &mut ChatSigningSession, + salt: u64, + timestamp: SystemTime, + message: &str, +) -> azalea_crypto::signing::MessageSignature { + use azalea_crypto::signing::SignChatMessageOptions; + + let certs = account + .certs() + .expect("certs shouldn't be set back to None"); + + let signature = azalea_crypto::signing::sign_chat_message(&SignChatMessageOptions { + account_uuid: account.uuid(), + chat_session_uuid: chat_session.session_id, + message_index: chat_session.messages_sent, + salt, + timestamp, + message: message.to_owned(), + private_key: certs.private_key.clone(), + }); + + chat_session.messages_sent += 1; + + signature +} diff --git a/azalea-client/src/plugins/client_chat/mod.rs b/azalea-client/src/plugins/client_chat/mod.rs new file mode 100644 index 00000000..ca247ec4 --- /dev/null +++ b/azalea-client/src/plugins/client_chat/mod.rs @@ -0,0 +1,243 @@ +//! Implementations of chat-related features. + +pub mod handler; + +use std::sync::Arc; + +use azalea_chat::FormattedText; +use azalea_protocol::packets::game::{ + c_disguised_chat::ClientboundDisguisedChat, c_player_chat::ClientboundPlayerChat, + c_system_chat::ClientboundSystemChat, +}; +use bevy_app::{App, Plugin, Update}; +use bevy_ecs::prelude::*; +use handler::{SendChatKindEvent, handle_send_chat_kind_event}; +use uuid::Uuid; + +pub struct ChatPlugin; +impl Plugin for ChatPlugin { + fn build(&self, app: &mut App) { + app.add_message::() + .add_message::() + .add_message::() + .add_systems( + Update, + (handle_send_chat_event, handle_send_chat_kind_event).chain(), + ); + } +} + +/// A chat packet, either a system message or a chat message. +#[derive(Clone, Debug, PartialEq)] +pub enum ChatPacket { + System(Arc), + Player(Arc), + Disguised(Arc), +} + +macro_rules! regex { + ($re:literal $(,)?) => {{ + static RE: std::sync::LazyLock = + std::sync::LazyLock::new(|| regex::Regex::new($re).unwrap()); + &RE + }}; +} + +impl ChatPacket { + /// Get the message shown in chat for this packet. + /// + /// See [`Self::split_sender_and_content`] for more details about how this + /// works. + pub fn message(&self) -> FormattedText { + match self { + ChatPacket::System(p) => p.content.clone(), + ChatPacket::Player(p) => p.message(), + ChatPacket::Disguised(p) => p.message(), + } + } + + /// A convenience function to determine the username of the sender and + /// the content of a chat message. + /// + /// This does not preserve formatting codes. + /// + /// This function uses a few checks to attempt to split the chat message, + /// and is intended to work on most servers. It won't work for every server + /// though, so in certain cases you may have to reimplement this yourself. + /// + /// If it's not a player-sent chat message or the sender couldn't be + /// determined, the username part will be None. + /// + /// Also see [`Self::sender`] and [`Self::content`] if you only need one of + /// the parts. + pub fn split_sender_and_content(&self) -> (Option, String) { + match self { + ChatPacket::System(p) => { + let message = p.content.to_string(); + // overlay messages aren't in chat + if p.overlay { + return (None, message); + } + + // it's a system message, so we'll have to match the content with regex + + // username surrounded by angle brackets (vanilla-like chat), and allow username + // prefixes like [Owner] + if let Some(m) = regex!(r"^<(?:\[[^\]]+?\] )?(\w{1,16})> (.+)$").captures(&message) + { + return (Some(m[1].to_string()), m[2].to_string()); + } + // username surrounded by square brackets (essentials whispers, vanilla-like + // /say), and allow username prefixes + if let Some(m) = + regex!(r"^\[(?:\[[^\]]+?\] )?(\w{1,16})(?: -> me)?\] (.+)$").captures(&message) + { + return (Some(m[1].to_string()), m[2].to_string()); + } + // username without angle brackets (2b2t whispers, vanilla-like whispers) + if let Some(m) = + regex!(r"^(\w{1,16}) whispers(?: to you)?: (.+)$").captures(&message) + { + return (Some(m[1].to_string()), m[2].to_string()); + } + // hypixel whispers + if let Some(m) = + regex!(r"^From (?:\[[^\]]+\] )(\w{1,16}): (.+)$").captures(&message) + { + return (Some(m[1].to_string()), m[2].to_string()); + } + + (None, message) + } + ChatPacket::Player(p) => ( + // If it's a player chat packet, then the sender and content + // are already split for us. + Some(p.chat_type.name.to_string()), + p.body.content.clone(), + ), + ChatPacket::Disguised(p) => ( + // disguised chat packets are basically the same as player chat packets but without + // the chat signing things + Some(p.chat_type.name.to_string()), + p.message.to_string(), + ), + } + } + + /// Get the username of the sender of the message. + /// + /// If it's not a player-sent chat message or the sender couldn't be + /// determined, this will be None. + /// + /// See [`Self::split_sender_and_content`] for more details about how this + /// works. + pub fn sender(&self) -> Option { + self.split_sender_and_content().0 + } + + /// Get the UUID of the sender of the message. + /// + /// If it's not a player-sent chat message, this will be None (this is + /// sometimes the case when a server uses a plugin to modify chat + /// messages). + pub fn sender_uuid(&self) -> Option { + match self { + ChatPacket::System(_) => None, + ChatPacket::Player(m) => Some(m.sender), + ChatPacket::Disguised(_) => None, + } + } + + /// Get the content part of the message as a string. + /// + /// This does not preserve formatting codes. If it's not a player-sent chat + /// message or the sender couldn't be determined, this will contain the + /// entire message. + pub fn content(&self) -> String { + self.split_sender_and_content().1 + } + + /// Create a new `ChatPacket` from a string. This is meant to be used as a + /// convenience function for testing. + pub fn new(message: &str) -> Self { + ChatPacket::System(Arc::new(ClientboundSystemChat { + content: FormattedText::from(message), + overlay: false, + })) + } + + /// Whether this message is an incoming whisper message (i.e. someone else + /// messaged the bot with /msg). + /// + /// This is not guaranteed to work correctly on custom servers. + pub fn is_whisper(&self) -> bool { + match self { + ChatPacket::System(p) => { + let message = p.content.to_string(); + if p.overlay { + return false; + } + if regex!(r"^(-> me|\w{1,16} whispers: )").is_match(&message) { + return true; + } + // hypixel + if regex!(r"^From (?:\[[^\]]+\] )?\w{1,16}: ").is_match(&message) { + return true; + } + + false + } + _ => match self.message() { + FormattedText::Text(_) => false, + FormattedText::Translatable(t) => t.key == "commands.message.display.incoming", + }, + } + } +} + +/// A client received a chat message packet. +#[derive(Clone, Debug, Message)] +pub struct ChatReceivedEvent { + pub entity: Entity, + pub packet: ChatPacket, +} + +/// Send a chat message (or command, if it starts with a slash) to the server. +#[derive(Message)] +pub struct SendChatEvent { + pub entity: Entity, + pub content: String, +} + +pub fn handle_send_chat_event( + mut events: MessageReader, + mut send_chat_kind_events: MessageWriter, +) { + for event in events.read() { + if event.content.starts_with('/') { + send_chat_kind_events.write(SendChatKindEvent { + entity: event.entity, + content: event.content[1..].to_string(), + kind: ChatKind::Command, + }); + } else { + send_chat_kind_events.write(SendChatKindEvent { + entity: event.entity, + content: event.content.clone(), + kind: ChatKind::Message, + }); + } + } +} + +/// A kind of chat packet, either a chat message or a command. +pub enum ChatKind { + Message, + Command, +} + +// TODO +// MessageSigner, ChatMessageContent, LastSeenMessages +// fn sign_message() -> MessageSignature { +// MessageSignature::default() +// } diff --git a/azalea-client/src/plugins/mod.rs b/azalea-client/src/plugins/mod.rs index 35e26f9e..b1fb01ac 100644 --- a/azalea-client/src/plugins/mod.rs +++ b/azalea-client/src/plugins/mod.rs @@ -3,10 +3,10 @@ use bevy_app::{PluginGroup, PluginGroupBuilder}; pub mod attack; pub mod block_update; pub mod brand; -pub mod chat; #[cfg(feature = "online-mode")] pub mod chat_signing; pub mod chunks; +pub mod client_chat; pub mod client_information; pub mod connection; pub mod cookies; @@ -41,7 +41,7 @@ impl PluginGroup for DefaultPlugins { .add(azalea_physics::PhysicsPlugin) .add(task_pool::TaskPoolPlugin::default()) .add(inventory::InventoryPlugin) - .add(chat::ChatPlugin) + .add(client_chat::ChatPlugin) .add(disconnect::DisconnectPlugin) .add(movement::MovementPlugin) .add(interact::InteractPlugin) diff --git a/azalea-client/src/plugins/packet/game/mod.rs b/azalea-client/src/plugins/packet/game/mod.rs index f1bff086..26e98ae5 100644 --- a/azalea-client/src/plugins/packet/game/mod.rs +++ b/azalea-client/src/plugins/packet/game/mod.rs @@ -32,8 +32,8 @@ use tracing::{debug, error, warn}; use crate::{ ClientInformation, block_update::QueuedServerBlockUpdates, - chat::{ChatPacket, ChatReceivedEvent}, chunks, + client_chat::{ChatPacket, ChatReceivedEvent}, connection::RawConnection, cookies::{RequestCookieEvent, StoreCookieEvent}, disconnect::DisconnectEvent, diff --git a/azalea-client/src/plugins/packet/mod.rs b/azalea-client/src/plugins/packet/mod.rs index d7b0d9df..546405e0 100644 --- a/azalea-client/src/plugins/packet/mod.rs +++ b/azalea-client/src/plugins/packet/mod.rs @@ -6,7 +6,7 @@ use bevy_ecs::{ }; use self::game::DeathEvent; -use crate::chat::ChatReceivedEvent; +use crate::client_chat::ChatReceivedEvent; pub mod config; pub mod game; -- cgit v1.2.3