Command system rewrite
Note: Help commands is currently disabled
This commit is contained in:
1 parent
2ee9710f93
commit
3d14e1310b
8 files changed
+98
-93
No files matched your search
@@ -12,7 +12,7 @@ use packet::{Packet, PacketError, PacketType};
|
||||
use pumpkin_config::RCONConfig;
|
||||
use thiserror::Error;
|
||||
|
||||
use crate::{commands::handle_command, server::Server};
|
||||
use crate::server::Server;
|
||||
|
||||
mod packet;
|
||||
|
||||
@@ -194,7 +194,8 @@ impl RCONClient {
|
||||
if self.logged_in {
|
||||
let mut output = Vec::new();
|
||||
let mut server = server.lock().await;
|
||||
handle_command(
|
||||
let dispatcher = server.command_dispatcher.clone();
|
||||
dispatcher.handle_command(
|
||||
&mut crate::commands::CommandSender::Rcon(&mut output),
|
||||
&mut server,
|
||||
packet.get_body(),
|
||||
|
||||
Reference in new issue
Block a user