mc-rcon/src/command/mod.rs
2026-07-28 17:24:10 +02:00

31 lines
No EOL
521 B
Rust

pub struct Command(String);
pub enum Selector {
NearestPlayer, // @p
RandomPlayer, // @r
AllPlayers, // @a
AllEntities, // @e
Executor, // @s
NearestEntity // @n
}
mod say;
mod list;
impl Command {
pub fn raw(cmd: &str) -> Self {
Self(cmd.to_string())
}
pub fn as_str(&self) -> &str {
&self.0
}
pub fn say() -> say::SayCommand {
say::SayCommand::default()
}
pub fn list() -> list::ListCommand {
list::ListCommand::default()
}
}