Skip to main content

yog_event/server/
command.rs

1//! Mods' commands run.
2
3use yog_data::Schema;
4
5/// A mod's command run; keyed by its name. Its handlers (subcommands of
6/// different shapes) are tried in order — the first to answer sets `reply`,
7/// what the source is told.
8#[derive(Debug, Clone, Schema)]
9pub struct Run {
10    /// The command, without the slash.
11    pub name: String,
12    /// Its arguments: a typed command's values in order, a plain one's words.
13    pub args: Vec<String>,
14    /// Who ran it: a player's name, or the console.
15    pub source: String,
16    /// The running entity's uuid; empty for the console.
17    pub uuid: String,
18    /// Where it ran; empty for the console.
19    pub dimension: String,
20    pub reply: Option<String>,
21}