Hey there. im using the citizens api to create an npc via command in my own plugin.
NPC citizen = CitizensAPI.getNPCRegistry().createNPC(EntityType.PLAYER, name);
citizen.spawn(location);
SkinTrait skinTrait = citizen.getOrAddTrait(SkinTrait.class);
skinTrait.setSkinPersistent(creator.toString(), skinSignature, skinValue);
citizen.getEntity().setCustomNameVisible(true);
citizen.getEntity().customName(MiniMessage.miniMessage().deserialize(name));
Chunk chunk = citizen.getEntity().getLocation().getChunk();
chunk.load();```
The skin trait sets the skin to the signature and value of the creators skin, so my own. But as you can see in the screen, sometimes theres no skin set and sometimes it works with the same code and the same skin data