Struct ServerPlayer
#[non_exhaustive]pub struct ServerPlayer {
pub uuid: u128,
pub name: String,
pub permission: u8,
pub dimension: String,
pub position: [f64; 3],
pub game_mode: i32,
pub health: f32,
pub yaw: f32,
pub pitch: f32,
pub entity_id: i32,
pub address: String,
}Expand description
A player on the server, as a server hook sees them.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.uuid: u128The player’s UUID.
name: StringThe player’s name.
permission: u8The operator level, 0 to 4 (ops.json; single player’s owner with
cheats on is 4).
dimension: Stringminecraft:overworld, minecraft:the_nether, minecraft:the_end.
position: [f64; 3]The player’s position in blocks.
game_mode: i320 survival, 1 creative, 2 adventure, 3 spectator.
health: f32Health points, 20 at full; 0 once dead.
yaw: f32Where they look, in degrees (yRot, xRot), as their last move told
the server.
pitch: f32The player’s pitch in degrees.
entity_id: i32The network entity id the player has this session, the one hooks that only know entity ids
(living_incoming_damage, living_knockback) give for the player; 0 when not known.
API @API:server_player_entity_id@.
address: StringThe IP address the player connects from, without the port (behind a Velocity proxy, the address the proxy forwards; empty when not known).
Trait Implementations§
§impl Clone for ServerPlayer
impl Clone for ServerPlayer
§fn clone(&self) -> ServerPlayer
fn clone(&self) -> ServerPlayer
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more