todo to TODO

This commit is contained in:
lukas0008 committed 2024-08-07 20:33:51 +02:00
1 parent fa8969d6a2
commit 2fd8686fea
9 files changed
+21 -21

No files matched your search

+3 -3
View File
@@ -18,7 +18,7 @@ impl<'a> Command<'a> for GamemodeCommand {
let args: Vec<&str> = command.split_whitespace().collect();
if args.len() != 2 {
// todo red
// TODO: red
player.send_system_message("Usage: /gamemode <mode>".into());
return;
}
@@ -30,13 +30,13 @@ impl<'a> Command<'a> for GamemodeCommand {
player.send_system_message(format!("Set own game mode to {mode_str}").into());
}
Err(_) => {
// todo red
// TODO: red
player.send_system_message("Invalid gamemode".into());
}
}
}
// todo: support console, (name required)
// TODO: support console, (name required)
fn player_required() -> bool {
true
}
+2 -2
View File
@@ -29,7 +29,7 @@ pub enum CommandSender<'a> {
impl<'a> CommandSender<'a> {
pub fn send_message(&mut self, text: TextComponent) {
match self {
// todo: add color and stuff to console
// TODO: add color and stuff to console
CommandSender::Console => log::info!("{}", text.text),
CommandSender::Player(c) => c.send_system_message(text),
}
@@ -66,6 +66,6 @@ pub fn handle_command(sender: &mut CommandSender, command: String) {
GamemodeCommand::on_execute(sender, command);
return;
}
// todo: red color
// TODO: red color
sender.send_message("Command not Found".into());
}