[Util] ProfileLoader v2 - Load a GameProfile and a skin from offline players.

Discussion in 'Resources' started by lenis0012, May 20, 2014.

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


    Hey, lenis0012 here again :)
    I was playing around with soe properties i found when i came across SwordPvP's handy uuid system.
    And i made a little utilitiy that allowd you to load game profiles with skins.
    Useful for npc's.

    Basicly, you construct a new ProfilerLoader instance using a uuid and display name. (it may or may not contain dashes)
    You can also use null if you dont have the uuid.
    Now also supports skin argument!
    Available constructors:
    uuid = UUID of player as a string, can be null.
    name = name of player, cant be null.
    skinOwner = name of a skin you want to use, will use same value as 'name' when not specified.
    1. new GameProfile(uuid, name); //Creates game profile for player named <name> with his own skin.
    2. new GameProfile(uuid, name, skinOwner); //Created game profile for player named <name> with skin of <skinOwner>

    And then you call loader.loadProfile() in an async task, very important

    Here is the code: https://gist.github.com/lenis0012/65cd395966c1b65af013

    bukkit likes to add tags to threads.
    You have to remove them ofc :p

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 8, 2016
    Phasesaber and bobacadodl like this.
  2. Offline


    What exactly does this do? Does it create a GameProfile instance which DOES work for player NPCs? If so, very good job.
  3. Offline


    It does
  4. Offline


    I thought the skins had to be "loaded in the server" somehow to make an NPC, or am I wrong?
  5. bigteddy98 That system got removed/temporary disabled because it had too many issues.
    bigteddy98 likes this.
  6. Offline


    Released v2.
    Fixed a few bugs & now using bukkit to handle uuid
  7. I can't import property and GameProfile.getProperties() don't works right ... Wich Version do i have to use?
  8. Offline


    Any CraftBukkit 1.7.9 build.
    lenis0012 likes this.
  9. I constructed it, I did profile.loadProfile(), but I haven't tested it yet, I just have a question: That's all? I don't need to do something with the returned GameProfile?
  10. Offline


    You can use it however you want.
    Its a resource you see.

    You can use it for NPCS, Disguises, offline-mode skin fix
    Whateber you want really
  11. Offline


    It seems like Mojang trys to block this function so you need to send the GET variable "unsigned=false" with it and u also don't need the User-Agent.

    //My Code
    1. URL url = new URL("[url]https://sessionserver.mojang.com/session/minecraft/profile/[/url]" + uuid + "?unsigned=false");
    2. URLConnection uc = url.openConnection();

    //without the [ url] and [ /url]
    BtoBastian and lenis0012 like this.
  12. podpage

    Thank you. :)
    Helped me to solve this very annoying problem that players couldn't join my server.
Thread Status:
Not open for further replies.

Share This Page