#uuid #minecraft #api-wrapper #user-name #convert #vice #minecraft-server

minecraft-uuid

A simple API wrapper to convert Minecraft usernames to UUIDs (and vice versa)

1 stable release

1.0.0 Nov 30, 2022

#18 in #vice

22 downloads per month

MIT license

8KB
127 lines

minecraft-uuid

A simple API wrapper to convert Minecraft usernames to UUIDs and vice versa.

[dependencies]
minecraft-uuid = "1"

Example

use minecraft_uuid::{get_uuid_by_username, get_username_by_uuid};

#[tokio::main]
async fn main() {
    let uuid = get_uuid_by_username("zekrotja")
        .await
        .expect("getting uuid");
    assert_eq!(uuid, "c3371e36f2884eaeb9d5b90e47258444");

    let username = get_username_by_uuid("c3371e36f2884eaeb9d5b90e47258444")
        .await
        .expect("getting username");
    assert_eq!(username, "zekroTJA");
}

Dependencies

~4–19MB
~258K SLoC