pub struct CPlayerInfoUpdate {
pub actions: u8,
pub entries: Vec<PlayerInfoEntry>,
}Fields§
§actions: u8§entries: Vec<PlayerInfoEntry>Implementations§
Source§impl CPlayerInfoUpdate
impl CPlayerInfoUpdate
Sourcepub fn create_player_initializing(
uuid: Uuid,
name: String,
properties: Vec<GameProfileProperty>,
game_mode: i32,
latency: i32,
display_name: Option<TextComponent>,
show_hat: bool,
) -> Self
pub fn create_player_initializing( uuid: Uuid, name: String, properties: Vec<GameProfileProperty>, game_mode: i32, latency: i32, display_name: Option<TextComponent>, show_hat: bool, ) -> Self
Creates a full player initializing packet with all information.
This is sent when a player joins to add them to the tab list.
Matches vanilla’s ClientboundPlayerInfoUpdatePacket.createPlayerInitializing()
Sourcepub fn update_chat_session(
uuid: Uuid,
chat_session: ProtocolRemoteChatSessionData,
) -> Self
pub fn update_chat_session( uuid: Uuid, chat_session: ProtocolRemoteChatSessionData, ) -> Self
Creates a packet to update a player’s chat session.
Sourcepub fn update_latency(entries: Vec<(Uuid, i32)>) -> Self
pub fn update_latency(entries: Vec<(Uuid, i32)>) -> Self
Creates a packet to update latency for multiple players. This is sent periodically (every 600 ticks) to update ping display.
Sourcepub fn update_game_mode(uuid: Uuid, game_mode: i32) -> Self
pub fn update_game_mode(uuid: Uuid, game_mode: i32) -> Self
Creates a packet to update a player’s game mode.
Sourcepub fn update_listed(uuid: Uuid, listed: bool) -> Self
pub fn update_listed(uuid: Uuid, listed: bool) -> Self
Creates a packet to update a player’s listed status (show/hide in tab list).
Sourcepub fn update_display_name(
uuid: Uuid,
display_name: Option<TextComponent>,
) -> Self
pub fn update_display_name( uuid: Uuid, display_name: Option<TextComponent>, ) -> Self
Creates a packet to update a player’s display name.
Sourcepub fn update_hat(uuid: Uuid, show_hat: bool) -> Self
pub fn update_hat(uuid: Uuid, show_hat: bool) -> Self
Creates a packet to update a player’s hat visibility.
Sourcepub fn update_list_order(uuid: Uuid, list_order: i32) -> Self
pub fn update_list_order(uuid: Uuid, list_order: i32) -> Self
Creates a packet to update a player’s list order (sort position in tab list).
Trait Implementations§
Source§impl ClientPacket for CPlayerInfoUpdate
impl ClientPacket for CPlayerInfoUpdate
Source§fn get_id(&self, protocol: ConnectionProtocol) -> Option<i32>
fn get_id(&self, protocol: ConnectionProtocol) -> Option<i32>
Gets the ID of the packet for the given protocol.
Source§fn write_packet(
&self,
writer: &mut impl Write,
protocol: ConnectionProtocol,
) -> Result<(), PacketError>
fn write_packet( &self, writer: &mut impl Write, protocol: ConnectionProtocol, ) -> Result<(), PacketError>
Writes the packet to the given writer. Read more
Source§impl Clone for CPlayerInfoUpdate
impl Clone for CPlayerInfoUpdate
Source§fn clone(&self) -> CPlayerInfoUpdate
fn clone(&self) -> CPlayerInfoUpdate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CPlayerInfoUpdate
impl Debug for CPlayerInfoUpdate
Auto Trait Implementations§
impl Freeze for CPlayerInfoUpdate
impl RefUnwindSafe for CPlayerInfoUpdate
impl Send for CPlayerInfoUpdate
impl Sync for CPlayerInfoUpdate
impl Unpin for CPlayerInfoUpdate
impl UnsafeUnpin for CPlayerInfoUpdate
impl UnwindSafe for CPlayerInfoUpdate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>