pub struct Player {
pub name: String,
}Expand description
An online player, by name: every action whose first field is player.
Fields§
§name: StringImplementations§
Source§impl Player
impl Player
Sourcepub fn actionbar_json(&self, json: impl Arg<String>) -> bool
pub fn actionbar_json(&self, json: impl Arg<String>) -> bool
Shows a text component above player’s hotbar.
Source§impl Player
impl Player
Sourcepub fn set_gamemode(&self, mode: impl Arg<String>) -> bool
pub fn set_gamemode(&self, mode: impl Arg<String>) -> bool
Sets player’s game mode (survival, creative, …).
Source§impl Player
impl Player
Sourcepub fn held_item_nbt(&self) -> Option<String>
pub fn held_item_nbt(&self) -> Option<String>
The custom data (SNBT) of what player holds.
Source§impl Player
impl Player
Sourcepub fn set_held_item_nbt(&self, snbt: impl Arg<String>) -> bool
pub fn set_held_item_nbt(&self, snbt: impl Arg<String>) -> bool
Sets the custom data of what player holds.
Source§impl Player
impl Player
Sourcepub fn offhand_item_nbt(&self) -> Option<String>
pub fn offhand_item_nbt(&self) -> Option<String>
The custom data (SNBT) of player’s offhand stack.
Source§impl Player
impl Player
Sourcepub fn set_offhand_item_nbt(&self, snbt: impl Arg<String>) -> bool
pub fn set_offhand_item_nbt(&self, snbt: impl Arg<String>) -> bool
Sets the custom data of player’s offhand stack.
Source§impl Player
impl Player
Sourcepub fn set_may_fly(&self, may_fly: impl Arg<bool>) -> bool
pub fn set_may_fly(&self, may_fly: impl Arg<bool>) -> bool
Lets player fly (or not).
Trait Implementations§
impl Eq for Player
impl StructuralPartialEq for Player
Auto Trait Implementations§
impl Freeze for Player
impl RefUnwindSafe for Player
impl Send for Player
impl Sync for Player
impl Unpin for Player
impl UnsafeUnpin for Player
impl UnwindSafe for Player
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