#(teyir) Citizens API, set a view distance for my NPC name

13 messages · Page 1 of 1 (latest)

feral terrace
#

Hello,

I want to define a distance for my NPC name (ex: at 10 blocks, we don't show the title).

This is my code to spawn my NPC:

        NPC npc = CitizensAPI.getNPCRegistry().createNPC(EntityType.SHEEP, "§7Companion de l'île §l" + event.getIsland().getName());
        npc.setProtected(true);
        npc.setFlyable(true);
        npc.setUseMinecraftAI(false);

        npc.addTrait(LookClose.class);
        npc.getOrAddTrait(LookClose.class).lookClose(true);

        npc.addTrait(Gravity.class);
        npc.getOrAddTrait(Gravity.class).gravitate(true);

        npc.spawn(npcLocation, SpawnReason.CREATE);

Thank you very much !

mighty fiberBOT
#

(teyir) Citizens API, set a view distance for my NPC name

#

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.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>

echo haven
#

Open feature request

#

Duplicate

grave beaconBOT
#
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.)

#

@feral terrace

feral terrace
echo haven
#

added

grave beaconBOT
#
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.)

#

@feral terrace

feral terrace
#

Thank you !