pub struct BlockEntityDestroyedEvent {
pub position: BlockPosition,
pub kind: BlockEntityKind,
pub last_state: BlockEntity,
}Expand description
Fires AFTER a block entity is removed from the world.
Non-cancellable. Fires during the Post stage. Carries the last state so plugins can drop contents, backup data, etc.
Fields§
§position: BlockPositionWorld position of the destroyed block entity.
kind: BlockEntityKindKind of block entity that was destroyed.
last_state: BlockEntityBlock entity state immediately before destruction.
Trait Implementations§
Source§impl Clone for BlockEntityDestroyedEvent
impl Clone for BlockEntityDestroyedEvent
Source§fn clone(&self) -> BlockEntityDestroyedEvent
fn clone(&self) -> BlockEntityDestroyedEvent
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 BlockEntityDestroyedEvent
impl Debug for BlockEntityDestroyedEvent
Source§impl Event for BlockEntityDestroyedEvent
impl Event for BlockEntityDestroyedEvent
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.Auto Trait Implementations§
impl Freeze for BlockEntityDestroyedEvent
impl RefUnwindSafe for BlockEntityDestroyedEvent
impl Send for BlockEntityDestroyedEvent
impl Sync for BlockEntityDestroyedEvent
impl Unpin for BlockEntityDestroyedEvent
impl UnsafeUnpin for BlockEntityDestroyedEvent
impl UnwindSafe for BlockEntityDestroyedEvent
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