From 20c7e27250148f62bab9e7b99e4f0cd6deb82325 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Sun, 28 Dec 2025 04:31:29 -0600 Subject: Change Client::component to return a reference (#298) * change Client::component to return a reference * write docs * merge main * remove unused parking_lot feature --- azalea/src/client_impl/chat.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'azalea/src/client_impl/chat.rs') diff --git a/azalea/src/client_impl/chat.rs b/azalea/src/client_impl/chat.rs index 3ca98631..e71a208f 100644 --- a/azalea/src/client_impl/chat.rs +++ b/azalea/src/client_impl/chat.rs @@ -11,7 +11,7 @@ impl Client { /// the message is a command and using the proper packet for you, so you /// should use that instead. pub fn write_chat_packet(&self, message: &str) { - self.ecs.lock().write_message(SendChatKindEvent { + self.ecs.write().write_message(SendChatKindEvent { entity: self.entity, content: message.to_owned(), kind: ChatKind::Message, @@ -24,7 +24,7 @@ impl Client { /// You can also just use [`Client::chat`] and start your message with a `/` /// to send a command. pub fn write_command_packet(&self, command: &str) { - self.ecs.lock().write_message(SendChatKindEvent { + self.ecs.write().write_message(SendChatKindEvent { entity: self.entity, content: command.to_owned(), kind: ChatKind::Command, @@ -41,7 +41,7 @@ impl Client { /// # } /// ``` pub fn chat(&self, content: impl Into) { - self.ecs.lock().write_message(SendChatEvent { + self.ecs.write().write_message(SendChatEvent { entity: self.entity, content: content.into(), }); -- cgit v1.2.3