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...
NameAssignment
Related Guide Pagehttps://guide.denizenscript.com/guides/npcs/assignment-scripts.html
Syntaxassignment [set/add/remove/clear] (script:<name>) (to:<npc>|...)
Short DescriptionChanges an NPC's assignment.
Full DescriptionChanges an NPC's assignment as though you used the '/npc assignment' command.

Uses the script: argument, which accepts an assignment-type script.

Optionally, specify a list of NPCs to apply the trait to. If unspecified, the linked NPC will be used.

'Set' is equivalent to 'clear' + 'add'.
Related Tags<NPCTag.script> Deprecated variant of Tag:NPCTag.scripts.
<server.npcs_assigned[<assignment_script>]> Returns a list of all NPCs assigned to a specified script.
Usage Example
# Use to assign an npc with exactly one assignment script named 'Bob_the_Builder'.
- assignment set script:Bob_the_Builder
Usage Example
# Use to give a different NPC an assignment.
- assignment set script:Bob_the_Builder npc:<[some_npc]>
Usage Example
# Use to clear an npc's assignments.
- assignment clear
Usage Example
# Use to add an extra assignment to the NPC.
- assignment add script:name_fix_assign
Usage Example
# Use to remove an extra assignment from the NPC.
- assignment remove script:name_fix_assign
Groupnpc
RequiresCitizens
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/npc/AssignmentCommand.java#L27