M server/src/main.rs => server/src/main.rs +3 -1
@@ 30,7 30,9 @@ fn main() {
})
.add_plugin(ServerPlugin::new(ServerConfig::default(), protocol()))
// init system
- .add_startup_system(systems::init::init);
+ .add_startup_system(systems::init::init)
+ // events
+ .add_system(systems::event::auth_events);
info!("Laurelin server starting");
server.run();
M server/src/systems/event/mod.rs => server/src/systems/event/mod.rs +1 -0
@@ 13,6 13,7 @@ use naia_bevy_server::{events::AuthEvents, Server};
pub(crate) fn auth_events(mut ev: EventReader<AuthEvents>, mut server: Server) {
for events in ev.iter() {
for (user_key, auth) in events.read::<Auth>() {
+ println!("TEMPORARY LOG TO CHECK IF WE GOT AN AUTH EVENT");
match auth.username {
Some(username) => {
// register