pub struct BlockBrokenEvent {
pub position: BlockPosition,
pub block_state: u16,
pub sequence: i32,
pub cancelled: bool,
}Expand description
A player broke a block.
Fired when the server receives a BlockDig packet with status 0.
The breaking player is available via ctx.player().
Fields§
§position: BlockPositionPosition of the broken block.
block_state: u16Block state that was at this position before breaking.
sequence: i32Sequence number for client acknowledgement.
cancelled: boolWhether this event has been cancelled by a Validate handler.
Trait Implementations§
Source§impl Clone for BlockBrokenEvent
impl Clone for BlockBrokenEvent
Source§fn clone(&self) -> BlockBrokenEvent
fn clone(&self) -> BlockBrokenEvent
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 BlockBrokenEvent
impl Debug for BlockBrokenEvent
Source§impl Event for BlockBrokenEvent
impl Event for BlockBrokenEvent
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 BlockBrokenEvent
impl EventRouting for BlockBrokenEvent
Auto Trait Implementations§
impl Freeze for BlockBrokenEvent
impl RefUnwindSafe for BlockBrokenEvent
impl Send for BlockBrokenEvent
impl Sync for BlockBrokenEvent
impl Unpin for BlockBrokenEvent
impl UnsafeUnpin for BlockBrokenEvent
impl UnwindSafe for BlockBrokenEvent
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