Solved Change skin problem

Discussion in 'Plugin Development' started by Tim203, Sep 23, 2017.

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

    Tim203

    Hello people,

    I am working on a plugin where you can get the skin of any player that you want.
    But, the Mojang API doesn't like me. (429 (too many requests) error)
    That is pretty irritating, because the skins won't update than.

    This is an example what my pl used to do:
    [​IMG]

    And the most times, this error code pops out:
    Server returned HTTP response code: 429 for URL: https://sessionserver.mojang.com/session/minecraft/prof....

    I am 100% sure that my code is good, see the image.
    How I do call Mojang?
    [​IMG]

    I hope that you can help my with tricks or bypasses :p
    Thanks :)
     
    Last edited: Sep 23, 2017
  2. Offline

    timtower Moderator Moderator

  3. Offline

    Tim203

    What do you mean?
    Which code?
    This?
    [​IMG]
     
  4. Offline

    timtower Moderator Moderator

    @Tim203 All your code, in pastebin please
     
  5. Offline

    Tim203

    @timtower My full project?
    Or just the code for getting values and stuff?
     
  6. Offline

    timtower Moderator Moderator

    @Tim203 I want to find out why this gets called so many times
     
  7. Offline

    Tim203

    The code for getting the skin:
    **Deleted**

    How I call the Skin.java:
    Code:
    Skin skin = new Skin(getUUID(name));
    getUUID(name):
    Code:
    @SuppressWarnings("deprecation")
    public String getUUID(String name) {
         return Bukkit.getOfflinePlayer(name).getUniqueId().toString().replace("-", "");
    }
     
    Last edited: Sep 23, 2017
  8. Offline

    timtower Moderator Moderator

    @Tim203 But how often does it get called?
     
  9. Offline

    Tim203

    Only if I type the command: /d [name]
    And the Skin skin = new Skin(... is only there, in the command.
     
  10. Offline

    timtower Moderator Moderator

    @Tim203 Why do you need that class anyways?
    Why not use a disguise plugin?
     
  11. Offline

    Tim203

    @timtower It is for a custom mc network ;)
    But do you know how to fix it, example: Random User-Agent.
    Or do you know an other site where I can find information about the skin?
     
  12. Offline

    timtower Moderator Moderator

    @Tim203 Server doesn't need to know about the skin. Custom network doesn't mean that you can't use something that exists already.
    It is probably ip based, not user agent.
     
  13. Offline

    Tim203

    Tnx for the info, this topic is done for me ;)
     
  14. Offline

    Zombie_Striker

    @Tim203
    If your problem has been solved, mark this thread as solved.
     
Thread Status:
Not open for further replies.

Share This Page