#(newNuriset) No way

31 messages · Page 1 of 1 (latest)

low ingot
#
public void spawn(Location location) {
NPC npc = CitizensAPI.getNPCRegistry().createNPC(EntityType.HUSK, "someNPC");

boolean spawn = npc.spawn(location);
Bukkit.getLogger().info("Spawned: " + spawn);
}

how variable spawn can be false?

rare crystalBOT
#

(newNuriset) No way

rare crystalBOT
#

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.

hidden pivot
#

@low ingot if you enable debug mode there will be more answers

low ingot
#
...
[13:50:05 INFO]: [Citizens] Retrying spawn of 63{TestZombie, HUSK} later, SpawnReason.PLUGIN. Was loaded true is loaded true
[13:50:05 INFO]: [Citizens] Stored 63{TestZombie, HUSK} for respawn from NPCNeedsRespawnEvent
...
#

what does Was loaded true is loaded true means

low ingot
#

also tried to re-spawn them with NPCNeedsRestartEvent but npc keep go state of 'need respawn'

hidden pivot
#

@low ingot looks like they couldn't be added to the world

#

maybe a plugin conflict or world settings issue?

low ingot
#

java.lang.NullPointerException: Cannot invoke "net.minecraft.world.entity.Entity.level()" because "handle" is null

#

now this occurs

low ingot
low ingot
hidden pivot
#

you need to provide more context

low ingot
#

tried to spawn npc with API by my plugin's command

#

amd there was no specific error or warning in log

hidden pivot
#

@low ingot please try to debug yourself then. I don't have access to your code

cold horizonBOT
#
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.)

#

@low ingot

low ingot
#

or can i post some of them here you need to debug?

hidden pivot
low ingot
#
Bukkit.getLogger().info("EntityType: " + ae.getEntityType()); // WITHER_SKELETON
NPC npc = CitizensAPI.getNPCRegistry().createNPC(ae.getEntityType(), ae.getClass().getSimpleName()); // NPC spawned with null EntityType

boolean spawn = npc.spawn(location);
Bukkit.getLogger().info("Spawned: " + spawn); // false
#

for some reaseon EntityType forced to null

hidden pivot
#

@low ingot ok this isn't enough code for context

#

please debug by yourself

low ingot
#

ok thanks

cold horizonBOT
#
Resolved

Thread closed as resolved.

low ingot
#

was my issue xd

cold horizonBOT
#
Thread Reopened

Thread was manually reopened by @low ingot.