#(red_carl) How to remove the name on the NPC's head

39 messages · Page 1 of 1 (latest)

neon schooner
#

I am using code to generate NPCs
NPCRegistry REGISTRY = CitizensAPI.createNamedNPCRegistry("ooci-lobby", new MemoryNPCDataStore());
String name = UUID.randomUUID().toString().split("-")[0];
NPC n = REGISTRY.createNPC(EntityType.PLAYER, name);

    n.getOrAddTrait(Equipment.class).set(0, new ItemStack(Material.SPYGLASS));
    n.getOrAddTrait(LookClose.class).lookClose(true);
fluid kiteBOT
#

(red_carl) How to remove the name on the NPC's head

fluid kiteBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

neon schooner
#

I used npc.data().setPersistent(NPC.Metadata.NAMEPLATE_VISIBLE, false); It doesn't work in the latest version

fathom sun
#

@neon schooner hmm can you post your logs code and latest screenshot

neon schooner
fathom sun
daring windBOT
# fathom sun !logcheck https://paste.denizenscript.com/View/124563
Server Version

Purpur version 1.21-2258-ver/1.21@ff19bcc (2024-07-09T03:12:26Z)

Plugin Version(s)

Citizens v2.0.35-SNAPSHOT (build 3475) -- (Current build :white_check_mark:)

Checked For

@fathom sun

Online/Offline

Offline, but proxied.

UUID Version

4 (:white_check_mark: Online)

Other Noteworthy Plugin(s)

WorldGuard v7.0.11-beta1+a801a9d, ProtocolLib v5.3.0-SNAPSHOT-723

Possibly Relevant Plugin(s)

TAB v4.1.5-SNAPSHOT - This plugin adds Below_Name scoreboards to NPCs.
FastAsyncWorldEdit v2.11.1-SNAPSHOT-846;514da16 - This plugin has been known to break the plugin load order on many servers, due to usage of the 'loadbefore' directive in its 'plugin.yml'.

fathom sun
#

@neon schooner can you post the full code?

neon schooner
#

ok

#

It was available before 1.21, but not now. I use /npc name and it works

fathom sun
#

@neon schooner where are you setting the metadata?

#

and the hologram?

neon schooner
#

Hologram I am using another plugin.

#

class

fathom sun
#

npc.data().setPersistent(NPC.Metadata.NAMEPLATE_VISIBLE, false);
npc.data().set(NPC.Metadata.NAMEPLATE_VISIBLE, false);
you do it twice for some reason

#

@neon schooner if /npc name works but your code doesn't, there's something wrong in your code

#

/npc name just sets the metadata

jaunty waveBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@neon schooner

jaunty waveBOT
#
Auto-Close Timeout

No response to request to close thread after 2 days. Automatically closing.

neon schooner
#

1

jaunty waveBOT
#
Thread Reopened

Thread was manually reopened by @neon schooner.

neon schooner
#

I changed the code to one, but it still doesn't work.

#

My code worked in 1.20.6, but it stopped working when I upgraded to 1.21 and upgraded citizens2 to the latest dev version.

#

I have used these codes since minecraft 1.8 & 1.12.2 & 1.20 and they all work fine

#

Another thing is that the frog is fine. Currently only the player is like this.

fathom sun
#

@neon schooner does /npc name work?

jaunty waveBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@neon schooner

neon schooner
#

work

neon schooner
#

I solved it. The method is to put the method of generating NPCs in the execution when the player enters the game

#

I used to put it when the plugin is loaded

jaunty waveBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@neon schooner