aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/client_impl
diff options
context:
space:
mode:
authorRaeders <38367311+nebula161@users.noreply.github.com>2026-01-23 23:04:54 -0500
committerGitHub <noreply@github.com>2026-01-23 22:04:54 -0600
commitd665924eb2163fc8afe256e502a39e72ad0e4a42 (patch)
tree5050630905b9802ef254e4352ac6d5c23116cacc /azalea/src/client_impl
parent4ab3609244d4eb87c3087f69f48083d9413a1cb3 (diff)
downloadazalea-drasl-d665924eb2163fc8afe256e502a39e72ad0e4a42.tar.xz
Implement SetExperience (#307)
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