mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-06 07:17:27 +00:00
* Initial minecraft support * Made previews_chat an option * Better error handling and removed version structure * Minecraft Server types * Fixed compilation and renamed stuff * 'extract till you drop!' extracted sockets * extracted java version and fixed socket udp receive * Legacy 1.4 and 1.6 implementation (incomplete) * Furter implementation * Implementations work * Protocol beta v1.8+ implemented * Removed bedrock support * Added auto query * Renamed minecraft to mc and added to md's * Docs, renames and small optimization changes * Changed java version to be able to return None on players sample
10 lines
298 B
Rust
10 lines
298 B
Rust
|
|
use gamedig::games::mc;
|
|
|
|
fn main() {
|
|
let response = mc::query("localhost", None); //or Some(25565), None is the default protocol port (which is 25565)
|
|
match response {
|
|
Err(error) => println!("Couldn't query, error: {error}"),
|
|
Ok(r) => println!("{:?}", r)
|
|
}
|
|
}
|