Skip to main content

yog_event/
chat.rs

1//! Messages to players: the host's actions.
2
3use yog_ids as ids;
4
5actions! {
6    /// Sends `message` to every player.
7    Broadcast { message: String } -> bool = ids::service_chat::BROADCAST, "YogChatActions.broadcast";
8    /// Sends `json` (a text component) to `player`'s chat.
9    Tellraw { player: String, json: String } -> bool = ids::service_chat::TELLRAW, "YogChatActions.tellraw";
10    /// Shows a title (and subtitle) to `player`; times in ticks.
11    Title { player: String, title: String, subtitle: String, fade_in: i32, stay: i32, fade_out: i32 } -> bool = ids::service_chat::TITLE, "YogChatActions.sendTitle";
12    /// Shows `message` above `player`'s hotbar.
13    Actionbar { player: String, message: String } -> bool = ids::service_chat::ACTIONBAR, "YogChatActions.sendActionbar";
14    /// Shows a text component above `player`'s hotbar.
15    ActionbarJson { player: String, json: String } -> bool = ids::service_chat::ACTIONBAR_JSON, "YogChatActions.actionbarJson";
16}