diff options
| author | mat <github@matdoes.dev> | 2021-12-13 00:07:21 -0600 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2021-12-13 00:07:21 -0600 |
| commit | c96ae8fce4e53ea9fad111ac7f479f2fa33ef859 (patch) | |
| tree | 2d35061fa712464b225317f56a806d0dd269ca82 /bot/src/main.rs | |
| parent | 2c3bf3b79e133acd01580144771a7cf238ecc4ee (diff) | |
| download | azalea-drasl-c96ae8fce4e53ea9fad111ac7f479f2fa33ef859.tar.xz | |
start implementing joining servers
Diffstat (limited to 'bot/src/main.rs')
| -rw-r--r-- | bot/src/main.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bot/src/main.rs b/bot/src/main.rs index 75a11dfd..2d62208d 100644 --- a/bot/src/main.rs +++ b/bot/src/main.rs @@ -1,11 +1,11 @@ -use minecraft_client::ping; -use minecraft_protocol::ServerAddress; +use minecraft_client::{connect::join_server, ping::ping_server}; use tokio::runtime::Runtime; async fn bot() { - let address = ServerAddress::parse(&"mc.hypixel.net".to_string()).unwrap(); - let response = ping::ping_server(&address).await.unwrap(); - println!("{}", response.description.to_ansi(None)); + let address = "localhost:63425"; + let response = join_server(&address.try_into().unwrap()).await.unwrap(); + // println!("{}", response.description.to_ansi(None)); + println!("connected"); } fn main() { |
