Solved NPC Skin not applying

Discussion in 'Spigot Plugin Development' started by David_Mayr, Jan 21, 2020.

  1. My Gameprofile code.
    Code (Text):

    GameProfile gameProfile = new GameProfile(UUID.randomUUID(), "Tombonation");
    gameProfile.getProperties().put("textures", new Property("textures", "eyJ0aW1lc3RhbXAiOjE1Nzk2MjQ0MTI0MTcsInByb2ZpbGVJZCI6ImZkZmM1ZjZhYzM5MjRhMDhiMTYwMDllNGJlMmJmZWRiIiwicHJvZmlsZU5hbWUiOiJUb21ib25hdGlvbiIsInNpZ25hdHVyZVJlcXVpcmVkIjp0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYWQyMjY5OWZhM2M0Y2E1YzUwOTdmMjk2NDhjMjM0ZDgwZTVkODNiYzJmYzcyYzhmYjBjYWM0Y2NhMDcwNzcxMiJ9fX0=", "eB/hWTHVZJlmqnfIemEQcQiqk2tbuEIToAHJZfH+XjPZJxcJF9F6nDQtwOlMwqj9KUC/Izxaej4EMjWW+kRTVJshQiGmHhpRBiNGFz5PqWMyqmcKOsp6nP5ytMUopdQjbhTV78SwwkygzO9qJrGzXzRwmZrbhxyN7UOC+cjFORBzwYmv1o/0tnpMcEURzBDr6+YxrT+hiWgTtKn/17x5+peDNxMUHv5pregrU0O8jSkGUACIqMItXXlUR0QFaiRzd17zZCohqK1OA6o19tjLPREd485U/xR3yJSFcgqG1eQh4ysUAOF6FoQZnprWZzudImS/L9nknNTo9nK2tK19uTnxyt3LjprAUL+N5//JT9O4Z2F9EOD5+7gX1AO6L1aj3NN93dMFgznryKs2AVd/ztYB8Z0S6HrFu6DP7fWHl4uGJPU63iB/tLOBhvXb+R3mE2UmlEfX/A2Im7U+u6LCZFpMWkOwNMDtDVOMBfySRm2rs7sSyt3PLQtpV8wHJXRwpuowzZdyRyKG5shO1xGQOPezE7GZaLpg+ak5EL4b3TrfnOa6nbNgooHdYs1XCwaTC+pQoh2QlqyXji73y9rqjhnk+MBjJVuWFaodbzZrfiQvnfOO0DmXaxDtwMjvc+mt7vRKMokUeRhfDomdaxgLMrBmbK1B5cqEJYegcF0TNpE="));
     
    Spawning:
    Code (Text):

    this.entityPlayer = new EntityPlayer(minecraftServer, worldServer, gameProfile, new PlayerInteractManager(worldServer));
    PacketPlayOutNamedEntitySpawn packetPlayOutNamedEntitySpawn = new PacketPlayOutNamedEntitySpawn(entityPlayer);
    sendPacket(packetPlayOutNamedEntitySpawn);
    PacketPlayOutPlayerInfo packetPlayOutPlayerInfo = new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, this.entityPlayer);
    sendPacket(packetPlayOutPlayerInfo);
     
    http://prntscr.com/qqwa94
    Where is the problem? I allready tryed setting the uuid.randomUUID to the uuid of "Tombonation" but it didnt work...
     
  2. Code (Text):
    // texture value & signature have been generated by https://mineskin.org/
            String texture = "";
            String signature = "";
           
            profile.getProperties().put("textures", new Property("textures", texture + "?unsigned=false", signature));
    Try this
     
  3. doesnt work :( still steve/alex
     
  4. Hey,

    i'm doing it like you in my own Plugin and it works as it should. The only thing i have before sending the Packets is:
    Code (Text):

    entityPlayer.playerConnection = new PlayerConnection(minecraftServer, new NetworkManager(EnumProtocolDirection.CLIENTBOUND), entityPlayer);
     
     
    • Like Like x 1
  5. This wasnt the problem :D
    I was removing the player to quickly from the tablist again and i forgot to write this in the tread sry...
    Its solved now