#(redegs) NPC not spawning through main class, but spawns through commands

18 messages · Page 1 of 1 (latest)

woeful jackal
#

Heres my code, It basically opens up an internal http server, sends a request to another http server running python, it then waits to recieve requests from this python server accordingly and one of the requests that the python server can send is a "Player join" request, which is supposed to signify that a player has joined, and the httphandler needs to spawn an NPC and create a join message in chat. But everything works except when I try to spawn the npc. At first I thought that citizens was broken but by using the exact same code, I can spawn an NPC through commands. My suspicion is that the HttpHandler method is running in a state where citizens hasn't loaded, so in a way, no citizen API methods can be used because it believes it hasnt loaded yet. How could I make this work?

green geodeBOT
#

(redegs) NPC not spawning through main class, but spawns through commands

green geodeBOT
#

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.

paper fulcrumBOT
valid raft
#

I'm not going to debug your Java code for you however you can check by enabling debug mode to see if it tried to spawn

#

@woeful jackal

woeful jackal
#

how do i enable debugmode?

woeful jackal
#

I got this 2024-07-31 22:43:26 [INFO] [Citizens] Profile lookup for player 'examplenpc' failed: Server did not find the requested profile

#

2024-07-31 22:43:25 [INFO] [Citizens] Tried to spawn 2{ExampleNPC, PLAYER} while already spawned. SpawnReason.PLUGIN

#

regarding players trying to spawn in through the HTTP handler, I get nothing.

#

nothing shows in logs although spawning in through commands does show in logs

valid raft
dapper slateBOT
#
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.)

#

@woeful jackal