diff options
Diffstat (limited to 'azalea-client/src')
| -rwxr-xr-x | azalea-client/src/chat.rs | 9 | ||||
| -rw-r--r-- | azalea-client/src/client.rs | 7 | ||||
| -rw-r--r-- | azalea-client/src/entity_query.rs | 2 |
3 files changed, 11 insertions, 7 deletions
diff --git a/azalea-client/src/chat.rs b/azalea-client/src/chat.rs index f238dd47..dbc2843c 100755 --- a/azalea-client/src/chat.rs +++ b/azalea-client/src/chat.rs @@ -122,10 +122,11 @@ impl ChatPacket { } impl Client { - /// Sends chat message to the server. This only sends the chat packet and - /// not the command packet. The [`Client::chat`] function handles checking - /// whether the message is a command and using the proper packet for you, - /// so you should use that instead. + /// Send a chat message to the server. This only sends the chat packet and + /// not the command packet, which means on some servers you can use this to + /// send chat messages that start with a `/`. The [`Client::chat`] function + /// handles checking whether the message is a command and using the + /// proper packet for you, so you should use that instead. pub fn send_chat_packet(&self, message: &str) { self.ecs.lock().send_event(SendChatKindEvent { entity: self.entity, diff --git a/azalea-client/src/client.rs b/azalea-client/src/client.rs index f4622eed..7f4a6170 100644 --- a/azalea-client/src/client.rs +++ b/azalea-client/src/client.rs @@ -133,7 +133,8 @@ pub enum JoinError { } impl Client { - /// Create a new client from the given GameProfile, Connection, and World. + /// Create a new client from the given [`GameProfile`], ECS Entity, ECS + /// World, and schedule runner function. /// You should only use this if you want to change these fields from the /// defaults, otherwise use [`Client::join`]. pub fn new( @@ -562,9 +563,9 @@ impl Client { /// Get the username of this client. /// /// This is a shortcut for - /// `bot.component::<GameProfileComponent>().name.clone()`. + /// `bot.component::<GameProfileComponent>().name.to_owned()`. pub fn username(&self) -> String { - self.component::<GameProfileComponent>().name.clone() + self.component::<GameProfileComponent>().name.to_owned() } /// Get the Minecraft UUID of this client. diff --git a/azalea-client/src/entity_query.rs b/azalea-client/src/entity_query.rs index 484da6f8..42b7b0ca 100644 --- a/azalea-client/src/entity_query.rs +++ b/azalea-client/src/entity_query.rs @@ -56,6 +56,8 @@ impl Client { /// } /// # } /// ``` + /// + /// [`Entity`]: bevy_ecs::entity::Entity pub fn entity_by<F: ReadOnlyWorldQuery, Q: ReadOnlyWorldQuery>( &mut self, predicate: impl EntityPredicate<Q, F>, |
