Citizens2 icon indicating copy to clipboard operation
Citizens2 copied to clipboard

Tracking System for Showing/Hiding to specific players

Open Cryptite opened this issue 4 years ago • 2 comments

An oft-requested feature, it'd be nice for Citizens to have a means by which NPCs could be white/blacklisted to players so that they could see specific NPCs and not others. In my specific use-case, Questing where players at certain stages of quest progress could see or not see certain NPCs is one example.

I mention the White/Blacklist system mostly in reference to this ProtocolLib Utility in which you can create groupings to manage entity tracking. That util is a bit old; there're some forked versions elsewhere that include more modern packets, etc.

fullwall asked that I put this here for tracking purposes.

Cryptite avatar Feb 20 '21 15:02 Cryptite

You're a Java dev right? There's literally a Bukkit API for this you can call and use for freely - https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/Player.html#hidePlayer(org.bukkit.entity.Player)

And if you're not able or willing to use Java for it for any reason, Denizen provides the hide_entity / hide_from_players mechanisms (which are slightly more robust as well, being based on NMS and packet interception)

mcmonkey4eva avatar Feb 20 '21 16:02 mcmonkey4eva

fullwall specifically asked that I make this issue as he mentioned it was something he wanted to add to Citizens, presumably also not requiring Denizen.

I'm also implementing this my own way for my plugin currently as well.

Cryptite avatar Feb 20 '21 16:02 Cryptite

Added in new build

fullwall avatar Mar 07 '23 16:03 fullwall