yog-event 0.8.0

Yog event system — pub/sub for game/server events.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Messages to players: the host's actions.

use yog_ids as ids;

actions! {
    /// Sends `message` to every player.
    Broadcast { message: String } -> bool = ids::service_chat::BROADCAST, "YogChatActions.broadcast";
    /// Sends `json` (a text component) to `player`'s chat.
    Tellraw { player: String, json: String } -> bool = ids::service_chat::TELLRAW, "YogChatActions.tellraw";
    /// Shows a title (and subtitle) to `player`; times in ticks.
    Title { player: String, title: String, subtitle: String, fade_in: i32, stay: i32, fade_out: i32 } -> bool = ids::service_chat::TITLE, "YogChatActions.sendTitle";
    /// Shows `message` above `player`'s hotbar.
    Actionbar { player: String, message: String } -> bool = ids::service_chat::ACTIONBAR, "YogChatActions.sendActionbar";
    /// Shows a text component above `player`'s hotbar.
    ActionbarJson { player: String, json: String } -> bool = ids::service_chat::ACTIONBAR_JSON, "YogChatActions.actionbarJson";
}