mirror of
https://github.com/GIKExe/rust_mc_serv.git
synced 2025-06-24 02:12:58 +03:00
Compare commits
2 Commits
b86dd46b36
...
a664c43887
Author | SHA1 | Date | |
---|---|---|---|
a664c43887 | |||
8cc4936f9a |
@ -37,7 +37,7 @@ cargo build -r
|
||||
Пример добавления в `Cargo.toml`:
|
||||
|
||||
```toml
|
||||
rust_mc_serv = { git = "https://github.com/GIKExe/rust_minecraft_server.git" }
|
||||
rust_mc_serv = { git = "https://github.com/GIKExe/rust_mc_serv.git" }
|
||||
```
|
||||
|
||||
Пример запуска сервера:
|
||||
|
30
src/lib.rs
30
src/lib.rs
@ -1,6 +1,5 @@
|
||||
use std::{error::Error, fmt::Display, net::TcpListener, sync::Arc, thread, time::Duration};
|
||||
|
||||
use config::Config;
|
||||
use context::ServerContext;
|
||||
use ignore_result::Ignore;
|
||||
use log::{error, info};
|
||||
@ -105,32 +104,3 @@ pub fn start_server(server: Arc<ServerContext>) {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// server start helper
|
||||
// pub struct Server {
|
||||
// context: Arc<ServerContext>,
|
||||
// }
|
||||
|
||||
// impl Server {
|
||||
// pub fn new(context: ServerContext) -> Self {
|
||||
// Self {
|
||||
// context: Arc::new(context),
|
||||
// }
|
||||
// }
|
||||
|
||||
// pub fn context(&self) -> &ServerContext {
|
||||
// &self.context
|
||||
// }
|
||||
|
||||
// pub fn start(&self) {
|
||||
// start_server(self.context.clone());
|
||||
// }
|
||||
// }
|
||||
|
||||
// impl Default for Server {
|
||||
// fn default() -> Self {
|
||||
// Self {
|
||||
// context: Arc::new(ServerContext::new(Arc::new(Config::default()))),
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
Loading…
x
Reference in New Issue
Block a user