#(DomiRusz24) NPC Load Event

23 messages · Page 1 of 1 (latest)

jaunty tartan
#

I need any kind of trigger (Event or otherwise) that executes upon loading all NPC's.
Basically after:
[Citizens] Loaded 20 NPCs.

I looked around inside the available Events and have found nothing, or I'm just blind.

brazen cragBOT
#

(DomiRusz24) NPC Load Event

brazen cragBOT
#

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>

jaunty tartan
#

I would try PluginLoadEvent or whatever Bukkits calls it, but I reckon the NPC loading happens async or just away from the main plugin initialisation, but I'll try in a few minutes. I'll leave this open in case anyone knows the exact thing I'm looking for.

#

Right now I am literally waiting a second before loading all my NPC's, but that is sub-optimal at best lol

vague bone
#

Citizens does not handle any events async

#

minecraft generally cannot support async

jaunty tartan
#

I mean, the plugin could load the NPC's async, and then being back on the sync thread call the event.

#

Or if not async, load it a tick after the server starts.

#

Anyways, that's not what I'm after.

jaunty tartan
#

Resolved, I decided not to wait and just do it by manually listening to NPCCreateEvent and check for any ID's that are in need of registering by my plugin.

meager fog
#

Yes, there is an event

#

Check the Java docs

tulip sandBOT
#
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.)

#

Error: Missing thread owner. Did they leave the Discord? If so, just use </resolved:1028673926114594866> yourself.