pub struct PlaceBlockEvent {
pub player_name: String,
pub block_id: String,
pub pos: BlockPos,
}Expand description
Fired when a player places a block (server side).
Passed to handlers registered via Registry::on_player_place_block with an
EventPhase argument:
Pre— fires before placement; returnfalseto cancel.Post— fires after placement (requires mixin support; not yet wired).
Fields§
§player_name: String§block_id: StringRegistry id of the block being placed, e.g. minecraft:stone.
pos: BlockPosTrait Implementations§
Source§impl Clone for PlaceBlockEvent
impl Clone for PlaceBlockEvent
Source§fn clone(&self) -> PlaceBlockEvent
fn clone(&self) -> PlaceBlockEvent
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 moreAuto Trait Implementations§
impl Freeze for PlaceBlockEvent
impl RefUnwindSafe for PlaceBlockEvent
impl Send for PlaceBlockEvent
impl Sync for PlaceBlockEvent
impl Unpin for PlaceBlockEvent
impl UnsafeUnpin for PlaceBlockEvent
impl UnwindSafe for PlaceBlockEvent
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