pub struct EntityInteractEvent {
pub player_name: String,
pub player_uuid: String,
pub entity_type: String,
pub entity_uuid: String,
pub hand: String,
}Expand description
Fired when a player right-clicks (interacts with) an entity (server side).
Pre— fires before the interaction; returnfalseto cancel.Post— fires after the interaction.
Fields§
§player_name: String§player_uuid: String§entity_type: StringRegistry id of the interacted entity, e.g. "minecraft:villager".
entity_uuid: String§hand: String"main_hand" or "off_hand".
Trait Implementations§
Source§impl Clone for EntityInteractEvent
impl Clone for EntityInteractEvent
Source§fn clone(&self) -> EntityInteractEvent
fn clone(&self) -> EntityInteractEvent
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 EntityInteractEvent
impl RefUnwindSafe for EntityInteractEvent
impl Send for EntityInteractEvent
impl Sync for EntityInteractEvent
impl Unpin for EntityInteractEvent
impl UnsafeUnpin for EntityInteractEvent
impl UnwindSafe for EntityInteractEvent
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