Hello, i tried to set a custom skin in a tablist, but unfortunately i didnt figure how to do this.
I followed the docs for the tablist, and this answer for try to set a custom skin to a gameprofile, but i dont know what to do on the last step, which is “Then, offer RepresentedPlayerData or its corresponding key to the item or Skull tileentity that you want to display it on.”.
Gist: Soldier76.java · GitHub
Can anyone help me please? :’( Sending skin data - #4 by Aaron1011
EDIT: the skin that i used with MineSkin is MineSkin
EDIT 2: i’m pretty noob, so it’s better if you answer me with an example :3
First, when it says ‘offer’, it literally means call offer(). However, since you are not actually making a skull, you can skip the last step. Instead, build a TabListEntry and apply the GameProfile to it using profile.
Okay i made it, i just took the code from the section “Java Game Profile” in the mineskin website and i modified it a little bit for made it work with sponge.
Seems like i was typing something wrong cause the code is really similiar to the old one.
I have created a library for Mineskin to make working with custom skin textures easier. It is currently usable, but I’m waiting for Ore to be released so I can write up tutorials about how to use it.
If you want to try it out, just add this line to the dependencies in your build.gradle:
compile 'com.github.Limeth:MineskinSponge:v1.2.2'
To use it, get an instance of MineskinService:
MineskinService service = Sponge.getServiceManager().provide(MineskinService.class).get();
service.getSkin(Paths.get("skin.png")).thenAccept(skin -> { skin.getProfile(); });