pub struct ContainerOpenEvent {
pub player_name: String,
pub player_uuid: String,
pub container_type: String,
}Expand description
Fired when a player opens a container screen.
Pre— returnfalseto prevent the screen from opening.Post— screen opened;container_typeis set.
Fields§
§player_name: String§player_uuid: String§container_type: StringScreen handler registry id, e.g. "minecraft:chest".
Empty string for screens not in the registry (e.g. the player inventory).
Trait Implementations§
Source§impl Clone for ContainerOpenEvent
impl Clone for ContainerOpenEvent
Source§fn clone(&self) -> ContainerOpenEvent
fn clone(&self) -> ContainerOpenEvent
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 ContainerOpenEvent
impl RefUnwindSafe for ContainerOpenEvent
impl Send for ContainerOpenEvent
impl Sync for ContainerOpenEvent
impl Unpin for ContainerOpenEvent
impl UnsafeUnpin for ContainerOpenEvent
impl UnwindSafe for ContainerOpenEvent
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