aboutsummaryrefslogtreecommitdiff
path: root/azalea/examples/testbot
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-04-04 06:23:19 -1400
committermat <git@matdoes.dev>2025-04-04 06:23:19 -1400
commit1fd02925903cfe59e85977b5c27e49457d99b142 (patch)
tree3289bd31d782512cbc011ac3087ab6c12d539f6b /azalea/examples/testbot
parent09d515c8cdd1bae32a5bc387b81360bad79eecf5 (diff)
downloadazalea-drasl-1fd02925903cfe59e85977b5c27e49457d99b142.tar.xz
rename ChatPacket::username and uuid to sender and sender_uuid
Diffstat (limited to 'azalea/examples/testbot')
-rw-r--r--azalea/examples/testbot/commands.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/azalea/examples/testbot/commands.rs b/azalea/examples/testbot/commands.rs
index c3cf1b47..4e261e17 100644
--- a/azalea/examples/testbot/commands.rs
+++ b/azalea/examples/testbot/commands.rs
@@ -24,14 +24,14 @@ impl CommandSource {
pub fn reply(&self, message: &str) {
if self.chat.is_whisper() {
self.bot
- .chat(&format!("/w {} {}", self.chat.username().unwrap(), message));
+ .chat(&format!("/w {} {}", self.chat.sender().unwrap(), message));
} else {
self.bot.chat(message);
}
}
pub fn entity(&mut self) -> Option<Entity> {
- let username = self.chat.username()?;
+ let username = self.chat.sender()?;
self.bot.entity_by::<With<Player>, &GameProfileComponent>(
|profile: &&GameProfileComponent| profile.name == username,
)