diff options
| author | mat <git@matdoes.dev> | 2025-02-17 23:09:24 +0000 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-02-17 23:09:24 +0000 |
| commit | 022771b71bdbfa29253342af36a63f0fe00ea962 (patch) | |
| tree | 41df4424d865e9586b46353d6c57dc50ad90a8d6 | |
| parent | 228489dded720cea566dd0a4638b39cba2aff5ec (diff) | |
| download | azalea-drasl-022771b71bdbfa29253342af36a63f0fe00ea962.tar.xz | |
update docs for TabList to mention how it works as a resource
| -rw-r--r-- | azalea-client/src/local_player.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/azalea-client/src/local_player.rs b/azalea-client/src/local_player.rs index 2d691826..9939c47a 100644 --- a/azalea-client/src/local_player.rs +++ b/azalea-client/src/local_player.rs @@ -100,6 +100,13 @@ pub struct PermissionLevel(pub u8); /// println!("- {} ({}ms)", player_info.profile.name, player_info.latency); /// } /// # } +/// ``` +/// +/// For convenience, `TabList` is also a resource in the ECS. +/// It's set to be the same as the tab list for the last client whose tab list +/// was updated. +/// This means you should avoid using `TabList` as a resource unless you know +/// all of your clients will have the same tab list. #[derive(Component, Resource, Clone, Debug, Deref, DerefMut, Default)] pub struct TabList(HashMap<Uuid, PlayerInfo>); |
