quectocraft2/src/main.rs

35 lines
487 B
Rust
Raw Normal View History

2023-07-26 00:53:51 -04:00
use std::sync::Arc;
2023-07-24 00:50:20 -04:00
2023-07-26 00:53:51 -04:00
use tokio::sync::Mutex;
2023-07-24 00:50:20 -04:00
use uuid::Uuid;
mod protocol;
2023-07-26 00:53:51 -04:00
mod server;
mod plugin;
2023-07-24 00:50:20 -04:00
mod ser;
mod varint;
mod client;
2023-07-26 00:53:51 -04:00
pub type ArcMutex<T> = Arc<Mutex<T>>;
2023-07-24 00:50:20 -04:00
pub type JsonValue = serde_json::Value;
2023-07-26 00:53:51 -04:00
#[derive(Clone, Debug)]
pub struct Player {
name: String,
uuid: Uuid,
}
2023-07-24 00:50:20 -04:00
#[derive(Clone, Debug)]
pub struct ClientInfo {
addr: String,
port: u16,
proto_version: i32,
proto_name: &'static str,
}
#[tokio::main]
2023-07-26 00:53:51 -04:00
async fn main() {
server::run_server().await.unwrap()
2023-07-24 00:50:20 -04:00
}