After restarting a server, right clicking my NPCs is supposed to open a special UI. I open this UI by getting their custom name like so event.getRightClicked().getCustomName(). This does not work with Citizens NPCs unless I toggled their nameplate visibility on and then off again. I want to have these NPCs named the correct thing for purposes of the server API calls, but have the name hidden to players.
#(sirprimrose) Setting custom name visibility makes API not function correctly
17 messages · Page 1 of 1 (latest)
(sirprimrose) Setting custom name visibility makes API not function correctly
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.
@unborn lance we set the custom name to blank for historical reasons, is there any reason you can’t use the citizens api?
I didn't really want to add another dependency to my plugin. I'd like it to work in case the citizens API is not something I end up using, though I can see how that could work.
Well if you have holograms as names the custom name might always be blank
I think it would be better to use the api
I'll try using this. Thanks for the response.
Ooo nice an NPCRightClickEvent. Sounds perfect for this in case anyone finds this thread: https://jd.citizensnpcs.co/net/citizensnpcs/api/event/NPCRightClickEvent.html
declaration: package: net.citizensnpcs.api.event, class: NPCRightClickEvent
👍
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.)
@unborn lance
Having this problem showing up when trying to use the API:
Could not find net.byteflux:libby-bukkit:1.1.5.
I have my gradle configured:
compileOnly("net.citizensnpcs:citizens-main:2.0.33-SNAPSHOT")
Am I supposed to also depend on citizensapi?
Changed my dependency to compileOnly("net.citizensnpcs:citizensapi:2.0.33-SNAPSHOT")