From 4ea03edfa990cb3bc1e0d84395112519f574ecc0 Mon Sep 17 00:00:00 2001 From: Andrew Gazelka Date: Sun, 17 Nov 2024 10:47:52 -0800 Subject: [PATCH] refactor: rename rank command to class --- events/proof-of-concept/src/command.rs | 5 +++-- events/proof-of-concept/src/command/rank.rs | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/events/proof-of-concept/src/command.rs b/events/proof-of-concept/src/command.rs index 7daaca1c..c69735b3 100644 --- a/events/proof-of-concept/src/command.rs +++ b/events/proof-of-concept/src/command.rs @@ -2,7 +2,8 @@ use flecs_ecs::core::World; use hyperion_clap::{MinecraftCommand, hyperion_command::CommandRegistry}; use crate::command::{ - fly::FlyCommand, rank::RankCommand, replace::ReplaceCommand, speed::SpeedCommand, xp::XpCommand, + fly::FlyCommand, rank::ClassCommand, replace::ReplaceCommand, speed::SpeedCommand, + xp::XpCommand, }; mod fly; @@ -14,7 +15,7 @@ mod xp; pub fn register(registry: &mut CommandRegistry, world: &World) { SpeedCommand::register(registry, world); FlyCommand::register(registry, world); - RankCommand::register(registry, world); + ClassCommand::register(registry, world); XpCommand::register(registry, world); ReplaceCommand::register(registry, world); } diff --git a/events/proof-of-concept/src/command/rank.rs b/events/proof-of-concept/src/command/rank.rs index 65f4ebff..400fb61e 100644 --- a/events/proof-of-concept/src/command/rank.rs +++ b/events/proof-of-concept/src/command/rank.rs @@ -22,12 +22,12 @@ use hyperion_inventory::PlayerInventory; use hyperion_utils::EntityExt; #[derive(Parser, Debug)] -#[command(name = "rank")] -pub struct RankCommand { +#[command(name = "class")] +pub struct ClassCommand { rank: hyperion_rank_tree::Rank, team: hyperion_rank_tree::Team, } -impl MinecraftCommand for RankCommand { +impl MinecraftCommand for ClassCommand { fn execute(self, world: &World, caller: Entity) { let rank = self.rank; let team = self.team;