diff options
| -rw-r--r-- | azalea/src/container.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/azalea/src/container.rs b/azalea/src/container.rs index d12fb380..3ae45e28 100644 --- a/azalea/src/container.rs +++ b/azalea/src/container.rs @@ -273,10 +273,13 @@ impl ContainerHandleRef { /// Returns the title of the container, or `None` if no container is open. /// /// ```no_run + /// # use azalea::prelude::*; + /// # fn example(bot: &azalea::Client) { /// let inventory = bot.get_inventory(); - /// let inventory_title = inventory.title.unwrap_or_default().to_string(); + /// let inventory_title = inventory.title().unwrap_or_default().to_string(); /// // would be true if an unnamed chest is open /// assert_eq!(inventory_title, "Chest"); + /// # } /// ``` pub fn title(&self) -> Option<FormattedText> { self.map_inventory(|inv| inv.container_menu_title.clone()) |
