wip new console

This commit is contained in:
Luuk van Oijen
2023-11-21 17:24:14 +01:00
parent 67cec26979
commit d9e0761e07
7 changed files with 465 additions and 11 deletions

View File

@@ -74,7 +74,7 @@ fn load_plugins() -> Vec<Plugin> {
#[derive(PartialEq, Eq, Clone, Debug)]
pub struct ServerStatus {
pub player_count: usize,
pub player_list: String,
pub player_list: Vec<(u8, String)>,
pub max_players: usize,
}
@@ -320,7 +320,7 @@ impl Server {
ServerStatus {
player_count: self.clients.len(),
player_list: self.clients.iter().map(|client| {
format!("{};", &client.get_name())
(client.id, client.get_name().to_string())
}).collect(),
// max_players: self.max_players, // TODO: Support this
max_players: self.config.general.max_players,