#(noisydk) NPC visible only to one player

23 messages · Page 1 of 1 (latest)

slow pecan
#

Hello,
since I have never used Citizens, I wanted to ask if it is possible with the API to create an NPC where only one player can see or certain players eg Packets?

floral fableBOT
#

(noisydk) NPC visible only to one player

floral fableBOT
#

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>

peak elbow
#

@slow pecan yes, for now use the bukkit hide/showPlayer methods

rotund shadowBOT
#
Changed to Feature

Thread is now a Feature thread. This indicates a request for a new feature to the plugin, that both (A) does not already exist and (B) reasonably can be added. If you are unsure whether this applies, use </helpthread:1028674284870180883> to change back to a normal help thread.

slow pecan
peak elbow
#

for (Player player : CitizensAPI.getLocationLookup().getNearbyPlayers(base, 64)){npcPlayer.hidePlayer(player);}

slow pecan
#

Can I somehow also make the NPC only visible to a certain player and invisible to all other players on the server?

peak elbow
#

yes

slow pecan
#

how sadcat

peak elbow
#

,,,

#

this is not a code support server

#

use the standard spigot apis

slate crest
#

A.hidePlayer(B) would hide B from A, you can use that however you'd like to hide players/NPCs - for further questions, as fullwall said, you should ask Spigot/Paper

rotund shadowBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please type </resolved:1028673926114594866> 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.)

#

@slow pecan