diff options
| author | Ubuntu <github@matdoes.dev> | 2022-11-15 20:44:33 +0000 |
|---|---|---|
| committer | Ubuntu <github@matdoes.dev> | 2022-11-15 20:44:33 +0000 |
| commit | 709c5dbc19ffb8c47e001b1d5c14846ee69e7988 (patch) | |
| tree | 09354cd9d5aaae42408a4cd5e7f7cc0cdfb9d4dd /azalea-client/src | |
| parent | 614c0df0537567c75f781df7affc091a4a466226 (diff) | |
| download | azalea-drasl-709c5dbc19ffb8c47e001b1d5c14846ee69e7988.tar.xz | |
add Client::metadata
Diffstat (limited to 'azalea-client/src')
| -rw-r--r-- | azalea-client/src/client.rs | 6 |
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 { |
