From c96ae8fce4e53ea9fad111ac7f479f2fa33ef859 Mon Sep 17 00:00:00 2001 From: mat Date: Mon, 13 Dec 2021 00:07:21 -0600 Subject: start implementing joining servers --- bot/src/main.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bot/src/main.rs') 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() { -- cgit v1.2.3