Denizen Script Commands


Commands are always written with a '-' before them, and are the core component of any script, the primary way to cause things to happen.
Learn about how commands work in The Beginner's Guide.


Showing 1 out of 184 commands...
NameSpawn
Syntaxspawn [<entity>|...] (<location>) (target:<entity>) (persistent) (reason:<reason>)
Short DescriptionSpawns a list of entities at a certain location.
Full DescriptionSpawn an entity or list of entities at the specified location.

Accepts the 'target:<entity>' argument which will cause all spawned entities to follow and attack the targeted entity.

If the persistent argument is present, the entity will not despawn when no players are within range, causing the entity to remain until killed.

Optionally specify 'reason:<reason>' (Paper only) to specify the reason an entity is spawning for the 'entity spawns' event,
using any reason from 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/CreatureSpawnEvent.SpawnReason.html

If the location isn't specified, will use either the linked NPC's location, or the linked player's location.
Related Tags<EntityTag.is_spawned> Returns whether the entity is spawned.
<server.entity_types> Returns a list of all entity types known to the server. (...)
<entry[saveName].spawned_entities> returns a list of entities that were spawned.
<entry[saveName].spawned_entity> returns the entity that was spawned (if you only spawned one).
Usage Example
# Use to spawn a spider at the player's location.
- spawn spider <player.location>
Usage Example
# Use to spawn a spider at the player's location which will automatically target the player.
- spawn spider <player.location> target:<player>
Usage Example
# Use to spawn a swarm of creepers around the npc, which will not despawn until killed.
- spawn creeper|creeper|creeper|creeper|creeper <npc.location> persistent
Synonyms (Search Aid)summon
Groupentity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/SpawnCommand.java#L32