/// Notifies this initial handler of a packet
/// received from the client. After calling this
/// function, `action_queue` should be called
/// and the actions should be executed in order.
Notifies this initial handler of a packet
received from the client. After calling this
function, `action_queue` should be called
and the actions should be executed in order.
Notifies this initial handler of a packet received from the client . After calling this function ` action_queue ` should be called and the actions should be executed in order .
pub async fn handle_packet(&mut self, packet: Box<dyn Packet>) {
        if self.stage == Stage::Finished {
            panic!("Called InitialHandler::handle_packet() after completion");
        }
        if let Err(e) = _handle_packet(self, packet).await {
            // Disconnect
            disconnect_login(self, &format!("{}", e));
            info!(
                "Player {} disconnected: {}",
                self.username.as_ref().unwrap_or(&"unknown".to_string()),
                e
            );
        }
    }
pub async fn handle_packet ( & mut self , packet : Box < dyn Packet > ) { if self . stage == Stage :: Finished { panic ! ( " " ) ; } if let Err ( e ) = _handle_packet ( self , packet ) . await { // Disconnect disconnect_login ( self , & format ! ( " " e ) ) ; info ! ( " " self username as_ref ( ) unwrap_or ( " " to_string ( ) ) e ) ; } }
Notifies this initial handler of a packet
received from the client.
Notifies this initial handler of a packet received from the client .
&mut self
packet
Box<dyn Packet>