juliarn / npc-lib

Asynchronous, high-performance Minecraft NPC library for 1.8-1.21 servers.
MIT License
323 stars 50 forks source link

Question: How to change NPC-Name? #129

Closed LxkasDEV closed 2 months ago

LxkasDEV commented 2 months ago

Hello, i want to know, how to change the Display-Name of an NPC. I want it to look like the first preview picture with a second line and the color fade. I havent found any way of changing the name, since there are no detailed documentations.

derklaro commented 2 months ago

The lib is not handling this, you need to do that with armor stand manually (or display entities in modern versions). Only thing you can do is changing the profile name.

DasBabyPixel commented 2 months ago

The lib is not handling this, you need to do that with armor stand manually (or display entities in modern versions). Only thing you can do is changing the profile name.

That's not possible though? You'd need to recreate the NPC to change profile name, wouldn't you? I just normally use a dummy name with color codes (§1§r, §2§r, §3§r, ...) and use scoreboard teams or hologram armor stands for name tags

derklaro commented 2 months ago

Yes, you need to respawn to change the profile name. It's only applicable if your display name is static :)

Jxsn-1 commented 2 months ago

Is there any way to hide the name? So you can use holograms without having the name in the way.

DasBabyPixel commented 2 months ago

Is there any way to hide the name? So you can use holograms without having the name in the way.

Use a scoreboard team with nametag visibility set to never

Farmeurimmo commented 2 months ago

Is there any way to hide the name? So you can use holograms without having the name in the way.

Use a scoreboard team with nametag visibility set to never

How do you do that? @DasBabyPixel

DasBabyPixel commented 2 months ago

register new team how to set a team option the option you want the option value add NPC name to team

Farmeurimmo commented 2 months ago

Thanks