aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/client_impl
diff options
context:
space:
mode:
Diffstat (limited to 'azalea/src/client_impl')
-rw-r--r--azalea/src/client_impl/mod.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/azalea/src/client_impl/mod.rs b/azalea/src/client_impl/mod.rs
index 343b8aef..6725174c 100644
--- a/azalea/src/client_impl/mod.rs
+++ b/azalea/src/client_impl/mod.rs
@@ -7,7 +7,7 @@ use azalea_client::{
connection::RawConnection,
disconnect::DisconnectEvent,
join::{ConnectOpts, StartJoinServerEvent},
- local_player::{Hunger, TabList, WorldHolder},
+ local_player::{Experience, Hunger, TabList, WorldHolder},
packet::game::SendGamePacketEvent,
player::{GameProfileComponent, PlayerInfo},
start_ecs_runner,
@@ -329,6 +329,13 @@ impl Client {
self.component::<Hunger>().to_owned()
}
+ /// Get the experience of this client.
+ ///
+ /// This is a shortcut for `self.component::<Experience>().to_owned()`.
+ pub fn experience(&self) -> Experience {
+ self.component::<Experience>().to_owned()
+ }
+
/// Get the username of this client.
///
/// This is a shortcut for