Change NPC name
Hi! Basically, I'm trying to change the name of a NPC, like this:
String villagerName = PluginUtils.getCustomData(container, EntityReplacer.NAME_KEY, String.class); npc.getProfile().setName(villagerName + " (Following)"); npc.visibility().queuePlayerListChange(VisibilityModifier.PlayerInfoAction.UPDATE_DISPLAY_NAME).send();
But nothing happens (no error in console), the name is the same as before, am I doing something wrong?
Also, I would like to change the texture of the NPC (setting its texture value and signature) without having to create a new NPC, how would I do that?
Thanks :)
What you're trying there is not possible as the profile name/uuid/properties are copied once initially when the npc is created, changes to the profile returned from getProfile will therefore not reflect into outbound packets.
Closing due to inactivity.