Support Commands in Server Console

This commit is contained in:
Snowiiii committed 2024-08-05 14:00:40 +02:00
1 parent c54ab006ae
commit ebda64b2c7
4 files changed
+45 -24

No files matched your search

+4 -3
View File
@@ -30,9 +30,10 @@ impl<'a> CommandSender<'a> {
}
pub fn handle_command(sender: &mut CommandSender, command: String, server: &mut Server) {
let command = command.to_lowercase();
dbg!("handling command");
dbg!(&command);
if command.starts_with(PumpkinCommand::NAME) {
PumpkinCommand::on_execute(sender, command, server)
PumpkinCommand::on_execute(sender, command, server);
return;
}
// todo: red color
sender.send_message("Command not Found".into());
}