From 72a0cf8c694edd69b0588a18c815df73677c2edc Mon Sep 17 00:00:00 2001 From: Raptorox <70806316+Raptorox@users.noreply.github.com> Date: Sat, 1 Aug 2026 12:48:38 +0200 Subject: [PATCH] add player name selector --- src/command/mod.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/command/mod.rs b/src/command/mod.rs index c7057d6..bc8e79b 100644 --- a/src/command/mod.rs +++ b/src/command/mod.rs @@ -8,7 +8,8 @@ pub enum Selector { AllPlayers, // @a AllEntities, // @e Executor, // @s - NearestEntity // @n + NearestEntity, // @n, + Player(String) } impl Display for Selector { @@ -19,7 +20,8 @@ impl Display for Selector { Self::AllPlayers => write!(f, "@a"), Self::AllEntities => write!(f, "@e"), Self::Executor => write!(f, "@s"), - Self::NearestEntity => write!(f, "@n") + Self::NearestEntity => write!(f, "@n"), + Self::Player(name) => write!(f, "{name}") } } } @@ -27,6 +29,7 @@ impl Display for Selector { mod say; mod list; mod kill; +mod ban; impl Command { pub fn raw(cmd: &str) -> Self { @@ -48,4 +51,8 @@ impl Command { pub fn kill() -> kill::KillCommand { kill::KillCommand::default() } + + pub fn ban() -> ban::BanCommand { + ban::BanCommand::default() + } } \ No newline at end of file