use bevy::prelude::*;
use lightyear::prelude::ServerConnectEvent;

pub struct MyServerPlugin;

impl Plugin for MyServerPlugin {
    fn build(&self, app: &mut App) {
        app.add_systems(Update, handle_events);
    }
}

pub fn handle_events(mut er_server_events: EventReader<ServerConnectEvent>) {
    for server_connect in er_server_events.read() {
        println!("Server Connect: {:?}", server_connect);
    }
}
