pub enum BroadcastMessage {
Chat {
content: NbtCompound,
},
PlayerJoined {
info: PlayerSnapshot,
},
PlayerLeft {
uuid: Uuid,
entity_id: i32,
username: String,
},
EntityMoved {
entity_id: i32,
x: f64,
y: f64,
z: f64,
yaw: f32,
pitch: f32,
on_ground: bool,
},
BlockChanged {
x: i32,
y: i32,
z: i32,
block_state: i32,
},
}Expand description
A message broadcast from one player’s task to all others.
Sent through the broadcast::Sender and received by each player’s
broadcast::Receiver in their play loop. Plugins use
ChatContext::broadcast
to send these.
Variants§
Chat
A chat message to display in all players’ chat windows.
Fields
§
content: NbtCompoundThe formatted text component as NBT.
PlayerJoined
A new player has joined the server.
Fields
§
info: PlayerSnapshotSnapshot of the joining player’s state.
PlayerLeft
A player has left the server.
Fields
EntityMoved
A player moved or changed look direction.
Fields
BlockChanged
A block was modified in the world.
Trait Implementations§
Source§impl Clone for BroadcastMessage
impl Clone for BroadcastMessage
Source§fn clone(&self) -> BroadcastMessage
fn clone(&self) -> BroadcastMessage
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 moreAuto Trait Implementations§
impl Freeze for BroadcastMessage
impl RefUnwindSafe for BroadcastMessage
impl Send for BroadcastMessage
impl Sync for BroadcastMessage
impl Unpin for BroadcastMessage
impl UnsafeUnpin for BroadcastMessage
impl UnwindSafe for BroadcastMessage
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