diff options
| author | mat <git@matdoes.dev> | 2026-01-23 18:09:59 -0930 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2026-01-23 18:09:59 -0930 |
| commit | 53e630f73f5fcc82a6818448cdb105abb75dfcc7 (patch) | |
| tree | ad5f58874ab147483a42638aa04ef8936b983694 /azalea-client/src/plugins | |
| parent | b7ad0e60f7b0a5f5a1f6a2c80abc865fdb250ee5 (diff) | |
| download | azalea-drasl-53e630f73f5fcc82a6818448cdb105abb75dfcc7.tar.xz | |
add Event::ConnectionFailed and add more plugins by default when using Client::join
Diffstat (limited to 'azalea-client/src/plugins')
| -rw-r--r-- | azalea-client/src/plugins/join.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/azalea-client/src/plugins/join.rs b/azalea-client/src/plugins/join.rs index a6c9c586..0f5747e9 100644 --- a/azalea-client/src/plugins/join.rs +++ b/azalea-client/src/plugins/join.rs @@ -86,7 +86,8 @@ pub struct ConnectOpts { #[derive(Message)] pub struct ConnectionFailedEvent { pub entity: Entity, - pub error: ConnectionError, + // wrap it in Arc so it can be cloned + pub error: Arc<ConnectionError>, } pub fn handle_start_join_server_event( @@ -197,7 +198,10 @@ pub fn poll_create_connection_task( Ok(conn) => conn, Err(error) => { warn!("failed to create connection: {error}"); - connection_failed_events.write(ConnectionFailedEvent { entity, error }); + connection_failed_events.write(ConnectionFailedEvent { + entity, + error: Arc::new(error), + }); return; } }; |
