aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/account.rs
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2022-07-07 05:58:44 +0000
committerGitHub <noreply@github.com>2022-07-07 05:58:44 +0000
commit31e5629ce1c8267802bbcb9d03b60a299d474e59 (patch)
tree5968b48af9b0c30149e908b043966c41dda0a61d /azalea-client/src/account.rs
parent27edd4f578e7b64fdaacefa26f691e2148707a8c (diff)
parent37d854c799236650da3deb025d8b32693531a27f (diff)
downloadazalea-drasl-31e5629ce1c8267802bbcb9d03b60a299d474e59.tar.xz
Merge branch 'main' into 1.19.1
Diffstat (limited to 'azalea-client/src/account.rs')
-rw-r--r--azalea-client/src/account.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/azalea-client/src/account.rs b/azalea-client/src/account.rs
index 56f4918a..32a46406 100644
--- a/azalea-client/src/account.rs
+++ b/azalea-client/src/account.rs
@@ -1,7 +1,8 @@
//! Connect to Minecraft servers.
-use crate::Client;
+use crate::{Client, Event};
use azalea_protocol::ServerAddress;
+use tokio::sync::mpsc::UnboundedReceiver;
/// Something that can join Minecraft servers.
pub struct Account {
@@ -14,7 +15,11 @@ impl Account {
}
}
- pub async fn join(&self, address: &ServerAddress) -> Result<Client, String> {
+ /// Joins the Minecraft server on the given address using this account.
+ pub async fn join(
+ &self,
+ address: &ServerAddress,
+ ) -> Result<(Client, UnboundedReceiver<Event>), String> {
Client::join(self, address).await
}
}