Player UUID storage problems I've run into

Discussion in 'Plugin Development' started by Neilnet, Jan 24, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    Neilnet

    I'm creating a plugin that logs down every time the user votes. Essentially, a top voter plugin.

    So say if I vote 10 times, my UUID gets recorded and so does the amount of times I vote. So when the player types /topvoters he shall get the usernames of the voters and how many times they vote.

    On startup, the top voters file converts all of the UUIDS to usernames and caches them in a hashmap. Though, the UUID fetcher that I uses always give me errors, it tries to connect to the user's profile and it gets this instead of the UUID :
    "The client has sent too many requests within a certain amount of time"

    Anyway to convert UUIDS to playerNames in batch on startup or every x amount of minutes (say 60 minutes)?
     
  2. Offline

    PreFiXAUT

    @Neilnet You could use Bukkit's Fetcher (1.7.9+) and get the Player (Or Offline-Player, should work too), and than his name. Bukkit already saves them (Saves the name that he had the last time when he was online on the Server).

    Otherwise the once way would be the way you already did :/
     
    Neilnet likes this.
  3. Offline

    Neilnet

    If I use the OfflinePlayer method too much, it bugs out and stops getting the UUIDs for a bit. Do you know why?

    Wait, is it because OfflinePlayer player = Bukkit.getOfflinePlayer(pID);

    can only return player's that have logged on to the server?

    EDIT by Timtower: merged posts
     
    Last edited by a moderator: Jan 24, 2015
  4. Offline

    adam753

    Neilnet likes this.
Thread Status:
Not open for further replies.

Share This Page