1use nil_client::{Client, ServerAddr};
5use nil_core::player::PlayerId;
6use nil_core::world::config::WorldId;
7use nil_crypto::password::Password;
8use nil_server_types::auth::Token;
9use serde::{Deserialize, Serialize};
10use std::sync::LazyLock;
11use tokio::sync::RwLock;
12
13pub(crate) static CLIENT: LazyLock<RwLock<Client>> = LazyLock::new(RwLock::default);
14
15#[derive(Clone, Debug, Default, Serialize, Deserialize)]
16#[serde(default)]
17pub struct UpdateClient {
18 pub server: ServerAddr,
19 pub world_id: Option<WorldId>,
20 pub world_password: Option<Password>,
21 pub player_id: Option<PlayerId>,
22 pub player_password: Option<Password>,
23 pub authorization_token: Option<Token>,
24}