Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce Mojang API calls #49

Open
Cryptizism opened this issue Apr 13, 2024 · 0 comments
Open

Reduce Mojang API calls #49

Cryptizism opened this issue Apr 13, 2024 · 0 comments

Comments

@Cryptizism
Copy link
Collaborator

Cryptizism commented Apr 13, 2024

User gave us some info and we can act accoridingly:

Mojang will keep imposing strict rate limits because me and a few other people are making millions of API requests per day to the Mojang API to make a full archive of more than 56 million UUIDs, player names, name change history, and skins for historical purposes. You should distinguish players between UUID versions rather than using the Mojang API and hitting rate limits.

There is no documentation since I created this project for myself which is used for laby.net Coverage as an example but I have made my code fully open-source for other people to take a look at: https://github.com/ItzLevvie/uuids/blob/4f0d6ca00c7a64e28c2b112e1c1bdedae49222a5/launch.js

More specifically, this code below:

[...]

// Minecraft puts all players under UUID version 4.
if (uuids[14] === "4") {
    Chat.log("§a" + players + " §fwith §a" + uuids);
    FS.open("validPlayers.txt").append(players + "\r\n");
    FS.open("validUUIDs.txt").append(uuids + "\r\n");
    FS.open("DEBUG.txt").append(players + " (player) with " + uuids + " (UUID version 4)" + "\r\n");
}

// Servers like Hypixel puts all NPCs under UUID version 2.
if (uuids[14] === "2") {
    //Chat.log("§4" + players + " §fwith §4" + uuids);
    FS.open("invalidPlayers.txt").append(players + "\r\n");
    FS.open("invalidUUIDs.txt").append(uuids + "\r\n");
    FS.open("DEBUG.txt").append(players + " (NPC) with " + uuids + " (UUID version 2)" + "\r\n");
}

// Servers like Hypixel puts all nicked players under UUID version 1.
if (uuids[14] === "1") {
    Chat.log("§4" + players + " §fwith §4" + uuids);
    FS.open("invalidPlayers.txt").append(players + "\r\n");
    FS.open("invalidUUIDs.txt").append(uuids + "\r\n");
    FS.open("DEBUG.txt").append(players + " (nicked player) with " + uuids + " (UUID version 1)" + "\r\n");
}

[...]

Originally posted by @ItzLevvie in #43 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant