use specs::{Component, FlaggedStorage, NullStorage, VecStorage}; #[derive(Clone, Debug, Serialize, Deserialize)] pub struct Player { pub alias: String, pub view_distance: Option, } impl Player { pub fn new(alias: String, view_distance: Option) -> Self { Self { alias, view_distance, } } } impl Component for Player { type Storage = FlaggedStorage>; } #[derive(Clone, Debug, Default, Serialize, Deserialize)] pub struct Respawn; impl Component for Respawn { type Storage = NullStorage; }