pub struct ItemPickupEvent {
pub player_name: String,
pub player_uuid: String,
pub item_id: String,
pub item_count: u32,
pub entity_uuid: String,
}Expand description
Fired when a player picks up an item entity.
Pre— returnfalseto prevent the pickup.Post— item was successfully picked up.
Fields§
§player_name: String§player_uuid: String§item_id: StringRegistry id of the item, e.g. "minecraft:diamond".
item_count: u32§entity_uuid: StringUUID of the item entity that was picked up.
Trait Implementations§
Source§impl Clone for ItemPickupEvent
impl Clone for ItemPickupEvent
Source§fn clone(&self) -> ItemPickupEvent
fn clone(&self) -> ItemPickupEvent
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 ItemPickupEvent
impl RefUnwindSafe for ItemPickupEvent
impl Send for ItemPickupEvent
impl Sync for ItemPickupEvent
impl Unpin for ItemPickupEvent
impl UnsafeUnpin for ItemPickupEvent
impl UnwindSafe for ItemPickupEvent
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