pub fn disconnect_player(player: Entity, reason: String, lazy: &LazyUpdate) {
    lazy.exec_mut(move |world| {
        let json = json!({
            "text": reason,
        });

        let packet = DisconnectPlay::new(json.to_string());
        send_packet_to_player(world.read_component().get(player).unwrap(), packet);

        disconnect_player_without_packet(player, world, reason);
    })
}
/// Disconnects the given player, removing them from the world.
/// This operation is performed lazily.
Disconnects the given player, removing them from the world.
This operation is performed lazily.
Disconnects the given player removing them from the world . This operation is performed lazily .
pub fn disconnect_player(player: Entity, reason: String, lazy: &LazyUpdate) {
    lazy.exec_mut(move |world| {
        let json = json!({
            "text": reason,
        });
        let packet = DisconnectPlay::new(json.to_string());
        send_packet_to_player(world.read_component().get(player).unwrap(), packet);
        disconnect_player_without_packet(player, world, reason);
    })
}
pub fn disconnect_player ( player : Entity , reason : String , lazy : & LazyUpdate ) { lazy . exec_mut ( move | world | { let json = json ! ( { " " reason } ) ; let packet = DisconnectPlay :: new ( json . to_string ( ) ) ; send_packet_to_player ( world . read_component ( ) . get ( player ) . unwrap ( ) , packet ) ; disconnect_player_without_packet ( player , world , reason ) ; } ) }
Disconnects the given player, removing them from the world.
Disconnects the given player removing them from the world .
player
Entity
reason
String
lazy
&LazyUpdate
player
Entity
reason
String
lazy
&LazyUpdate