#minecraft #protocol #api

nightly mcio

minecraft server list ping library

6 releases

0.3.1 Apr 19, 2020
0.3.0 Apr 18, 2020
0.2.0 Apr 18, 2020
0.1.4 Apr 18, 2020

#32 in #minecraft

Download history 9/week @ 2021-01-13 3/week @ 2021-01-20 2/week @ 2021-01-27 2/week @ 2021-02-03 101/week @ 2021-02-10 20/week @ 2021-02-17 2/week @ 2021-02-24 3/week @ 2021-03-03 2/week @ 2021-03-10 2/week @ 2021-03-17 13/week @ 2021-03-24 19/week @ 2021-03-31 9/week @ 2021-04-07 8/week @ 2021-04-14 8/week @ 2021-04-21 8/week @ 2021-04-28

52 downloads per month

MIT license

11KB
249 lines

mcio is a simple library for Rust that completes a Minecraft handshake and server list ping. It can be used to fetch a Minecraft server's:

  • Version (including name and protocol number)
  • Players
    • Max players
    • Online players
    • Online players sample
  • MOTD
  • Icon

As of right now, all calls to mcio are blocking.

Example Usage

fn main() {
    let response = mcio::ping("mc.hypixel.net", 25565, 315).expect("Failed to get response.");

    println!("Players: {}/{}", response.players.online, response.players.max);
    /* Players: 62075/85000 */
}

Dependencies

~9.5MB
~198K SLoC