async-minecraft-ping (0.4.0)

Published 2024-08-02 23:21:42 +02:00 by LordMZTE in LordMZTE/async-minecraft-ping

Installation

[registry]
default = "forgejo"

[registries.forgejo]
index = "sparse+" # Sparse index
# index = "" # Git

[net]
git-fetch-with-cli = true
cargo add async-minecraft-ping@0.4.0

About this package

An async Rust client for the Minecraft ServerListPing protocol

async-minecraft-ping

An async ServerListPing client implementation in Rust.

Usage

See the example.

let mut config = ConnectionConfig::build(args.address);
if let Some(port) = args.port {
    config = config.with_port(port);
}

let mut connection = config.connect().await?;

let status = connection.status().await?;

println!(
    "{} of {} player(s) online",
    status.players.online, status.players.max
);

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

ID Version
async-trait ^0.1.81
serde ^1.0.204
serde_json ^1.0.122
thiserror ^1.0.63
tokio ^1.39.2
anyhow ^1.0.86
structopt ^0.3.26
tokio ^1.39.2

Keywords

minecraft mc serverlistping
Details
Cargo
2024-08-02 23:21:42 +02:00
49
Jay Vana <jaysvana@gmail.com>
LordMZTE <lord@mzte.de>
MIT OR Apache-2.0
15 KiB
Assets (1)
Versions (1) View all
0.4.0 2024-08-02