| Name | npc spawns |
| Event Lines | npc spawns |
| Triggers | when an NPC spawns. |
| Generated Examples | on npc spawns: |
| Has NPC | Always. |
| Switches | npc:<npc> to only process the event if the spawned NPC matches.
reason:<reason> to only process the event if the NPC's spawn reason matches. See https://jd.citizensnpcs.co/net/citizensnpcs/api/event/SpawnReason.html for a list of reasons. |
| Contexts | <context.location> returns the location the entity will spawn at.
<context.reason> returns the reason of the spawn.
|
| Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | NPC |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/npc/NPCSpawnScriptEvent.java#L16 |