Skip to main content

ChatContext

Trait ChatContext 

Source
pub trait ChatContext {
    // Required methods
    fn send(&self, text: &str);
    fn send_component(&self, component: &TextComponent);
    fn action_bar(&self, text: &str);
    fn broadcast(&self, text: &str);
    fn broadcast_component(&self, component: &TextComponent);
}
Expand description

Chat and messaging.

Required Methods§

Source

fn send(&self, text: &str)

Sends a plain text message to the current player.

Source

fn send_component(&self, component: &TextComponent)

Sends a styled message to the current player.

Source

fn action_bar(&self, text: &str)

Sends an action bar message to the current player.

Source

fn broadcast(&self, text: &str)

Broadcasts a plain text message to ALL connected players.

Source

fn broadcast_component(&self, component: &TextComponent)

Broadcasts a styled message to ALL connected players.

Implementors§