yog_event/server/life.rs
1//! The server starting and stopping.
2
3use yog_data::Schema;
4
5/// Fired once the server has started.
6#[derive(Debug, Clone, Schema)]
7pub struct Started {
8 /// The world's folder.
9 pub world_dir: String,
10}
11
12/// Fired as the server stops.
13#[derive(Debug, Clone, Schema)]
14pub struct Stopping {}
15
16/// Fired as the world is saved — an autosave, `/save-all`, the server
17/// stopping — before its chunks are written: what's kept with the world is
18/// written now, so it's saved with the world it belongs to.
19#[derive(Debug, Clone, Schema)]
20pub struct Saving {}