Struct PlayerAbilities
#[non_exhaustive]pub struct PlayerAbilities {
pub invulnerable: bool,
pub flying: bool,
pub may_fly: bool,
pub instabuild: bool,
pub may_build: bool,
pub fly_speed: f32,
pub walk_speed: f32,
}Expand description
A player’s server-side abilities (Abilities).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.invulnerable: boolTakes no damage.
flying: boolIs flying now.
may_fly: boolMay start flying.
instabuild: boolBreaks blocks at once and uses no items (creative).
may_build: boolMay break and place blocks.
fly_speed: f32The flying speed.
walk_speed: f32Walking speed (Abilities.walkingSpeed, vanilla’s 0.1).
Trait Implementations§
§impl Clone for PlayerAbilities
impl Clone for PlayerAbilities
§fn clone(&self) -> PlayerAbilities
fn clone(&self) -> PlayerAbilities
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 moreimpl Copy for PlayerAbilities
§impl Debug for PlayerAbilities
impl Debug for PlayerAbilities
§impl From<PlayerAbilities> for PlayerAbilities
impl From<PlayerAbilities> for PlayerAbilities
§fn from(v: PlayerAbilities) -> PlayerAbilities
fn from(v: PlayerAbilities) -> PlayerAbilities
Converts to this type from the input type.
§impl PartialEq for PlayerAbilities
impl PartialEq for PlayerAbilities
impl StructuralPartialEq for PlayerAbilities
Auto Trait Implementations§
impl Freeze for PlayerAbilities
impl RefUnwindSafe for PlayerAbilities
impl Send for PlayerAbilities
impl Sync for PlayerAbilities
impl Unpin for PlayerAbilities
impl UnsafeUnpin for PlayerAbilities
impl UnwindSafe for PlayerAbilities
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