aboutsummaryrefslogtreecommitdiff
path: root/azalea-client
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-client')
-rw-r--r--azalea-client/src/client.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/azalea-client/src/client.rs b/azalea-client/src/client.rs
index 282de48f..2aef1709 100644
--- a/azalea-client/src/client.rs
+++ b/azalea-client/src/client.rs
@@ -910,6 +910,12 @@ impl Client {
Ok(())
}
+
+ /// Get the player metadata for ourselves. You can use this to get your
+ /// health, xp score, and other useful information.
+ pub fn metadata(&self) -> metadata::Player {
+ self.entity().metadata.clone().into_player().unwrap()
+ }
}
impl<T> From<std::sync::PoisonError<T>> for HandleError {