Communities
This commit is contained in:
parent
6ae6e85b5a
commit
1c08956387
26 changed files with 1988 additions and 338 deletions
|
|
@ -1,8 +1,6 @@
|
|||
use crate::util::file_util::{load_file, save_file};
|
||||
use json::JsonValue;
|
||||
use once_cell::sync::Lazy;
|
||||
use std::fs::{self, File};
|
||||
use std::path::Path;
|
||||
use std::sync::Mutex;
|
||||
use uuid::Uuid;
|
||||
|
||||
|
|
@ -36,6 +34,10 @@ impl ConfigUtil {
|
|||
.unwrap_or_default()
|
||||
}
|
||||
|
||||
pub fn get_port(&self) -> u16 {
|
||||
self.config["port"].as_u16().unwrap_or(1984)
|
||||
}
|
||||
|
||||
pub fn change(&mut self, key: &str, value: Uuid) {
|
||||
self.config[key] = JsonValue::String(value.to_string());
|
||||
self.unique = true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue