pub struct PlayerMovedEvent {
pub position: Position,
pub rotation: Rotation,
pub on_ground: bool,
pub old_chunk: ChunkPosition,
}Expand description
A player moved or changed look direction.
Fired after the position is updated. Not cancellable — the server
is not authoritative for position in vanilla Minecraft.
The moving player is available via ctx.player().
Fields§
§position: PositionNew absolute position.
rotation: RotationNew facing direction.
on_ground: boolWhether the player is on the ground.
old_chunk: ChunkPositionChunk position before the movement (for boundary detection).
Trait Implementations§
Source§impl Clone for PlayerMovedEvent
impl Clone for PlayerMovedEvent
Source§fn clone(&self) -> PlayerMovedEvent
fn clone(&self) -> PlayerMovedEvent
Returns a duplicate of the value. Read more
1.0.0 · 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 PlayerMovedEvent
impl Debug for PlayerMovedEvent
Source§impl Event for PlayerMovedEvent
impl Event for PlayerMovedEvent
Source§fn is_cancelled(&self) -> bool
fn is_cancelled(&self) -> bool
Whether this event has been cancelled by a Validate handler.
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Upcasts to
&mut dyn Any for mutable type-erased dispatch.Source§impl EventRouting for PlayerMovedEvent
impl EventRouting for PlayerMovedEvent
Auto Trait Implementations§
impl Freeze for PlayerMovedEvent
impl RefUnwindSafe for PlayerMovedEvent
impl Send for PlayerMovedEvent
impl Sync for PlayerMovedEvent
impl Unpin for PlayerMovedEvent
impl UnsafeUnpin for PlayerMovedEvent
impl UnwindSafe for PlayerMovedEvent
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