Skip to content

Commit

Permalink
refactor: rename rank command to class
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewgazelka committed Nov 17, 2024
1 parent 25be5f8 commit 4ea03ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions events/proof-of-concept/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}
6 changes: 3 additions & 3 deletions events/proof-of-concept/src/command/rank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4ea03ed

Please sign in to comment.