diff options
Diffstat (limited to 'azalea/examples/testbot')
| -rw-r--r-- | azalea/examples/testbot/commands.rs | 4 |
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, ) |
