From 022771b71bdbfa29253342af36a63f0fe00ea962 Mon Sep 17 00:00:00 2001 From: mat Date: Mon, 17 Feb 2025 23:09:24 +0000 Subject: [PATCH] update docs for TabList to mention how it works as a resource --- azalea-client/src/local_player.rs | 7 +++++++ 1 file changed, 7 insertions(+) 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);