pub struct CommandEvent {
pub command: String,
pub cancelled: bool,
}Expand description
A player issued a command (e.g., /tp 0 64 0).
If cancelled, the command is not executed. The issuing player
is available via ctx.player().
Fields§
§command: StringThe command string without the leading /.
cancelled: boolWhether this event has been cancelled by a Validate handler.
Trait Implementations§
Source§impl Clone for CommandEvent
impl Clone for CommandEvent
Source§fn clone(&self) -> CommandEvent
fn clone(&self) -> CommandEvent
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 CommandEvent
impl Debug for CommandEvent
Source§impl Event for CommandEvent
impl Event for CommandEvent
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.Source§impl EventRouting for CommandEvent
impl EventRouting for CommandEvent
Auto Trait Implementations§
impl Freeze for CommandEvent
impl RefUnwindSafe for CommandEvent
impl Send for CommandEvent
impl Sync for CommandEvent
impl Unpin for CommandEvent
impl UnsafeUnpin for CommandEvent
impl UnwindSafe for CommandEvent
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