diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2025-12-28 04:31:29 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-28 04:31:29 -0600 |
| commit | 20c7e27250148f62bab9e7b99e4f0cd6deb82325 (patch) | |
| tree | 163b312ef4dc72c5c23be923f8ca17cdf2a7278c /azalea/src/client_impl/chat.rs | |
| parent | 7ab3b8924f64f7eadb6b8928b6fae73cb06e4c2f (diff) | |
| download | azalea-drasl-20c7e27250148f62bab9e7b99e4f0cd6deb82325.tar.xz | |
Change Client::component to return a reference (#298)
* change Client::component to return a reference
* write docs
* merge main
* remove unused parking_lot feature
Diffstat (limited to 'azalea/src/client_impl/chat.rs')
| -rw-r--r-- | azalea/src/client_impl/chat.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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<String>) { - self.ecs.lock().write_message(SendChatEvent { + self.ecs.write().write_message(SendChatEvent { entity: self.entity, content: content.into(), }); |
