yog_event/planes/play/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 /// Its permission level, as the game has it (0 anyone … 4 the
21 /// server's owners; the console all of them).
22 pub permission: i32,
23 /// Whether it's an operator: the level the game's operators' commands
24 /// want, by the game's own measure.
25 pub op: bool,
26 pub reply: Option<String>,
27}