Mojang API - Problems

Discussion in 'BungeeCord Plugin Development' started by NyxCode, Apr 15, 2017.

  1. Hey!
    I'm currently developing a big minecraft network and I've got a problem. When a player on my network asks for information about a specific player, and the requested player is not in my database, my software talks to the Mojang API to get the UUID. When I started to do some testing I noticed that the API does not allow more than 600 requests per 10 minutes. That's a problem. I'd be appreciate any ideas on how to bypass this limit.

    Best regards!
  2. Are you caching results/saving them somewhere so you don't end up doing the same request over and over?

    AFAIK there isn't any good way to bypass the limit. Your best bet is to try and make the number of requests you make as little as possible.

    You can also make requests to third parties such as , which has a limit of 200 requests per minute.
  3. You can make custom REST URLs specified by . Then you wouldn't need any API's except for Mojang's. Hope that helped
    • Like Like x 1
  4. md_5

    Administrator Developer

    Yeah I'm guessing you're repeatedly asking for the same players.
    One server on your network shouldn't be getting 60 never before seen players a minute (unless you're network is super popular and you just deployed this code, in which case just deal with it an in a few hours it will drop below that limit).
    • Agree Agree x 2
  5. If you still stick to mcuuid, you should cache the players or save them to a local file.
  6. No, I'm not. As already mentioned, I planned a feature which makes it possible for players to ask for the "profile" of every player, even if this player was never on my network. Once I received an answer from mojang I cache it and save it in my database. But I agree, reaching that limit will be hard, but not impossible. ;)

    Wow, thats a great idea. I will rewrite my code so that it supports both mojang and mcuuid.

    Because this problem is not urgent, but pretty interresting, I will develop a small network for resolving UUIDs and usernames. Threre will be a master, which talks to slaves. If I want to know a UUID/name, the master will ask a slave. If this slave can't respond, the master will ask an other one. I'll release this project on github and I'll post a link to it in this thread once I'm done.

    Thanks for all your helpfull answers!
    Works too, but im not sure whats the limit