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...
NameRename
Syntaxrename [<name>/cancel] (t:<entity>|...) (per_player) (for:<player>|...) (list_name_only)
Short DescriptionRenames the linked NPC or list of entities.
Full DescriptionRenames the linked NPC or list of entities.
Functions like the '/npc rename' command.

Can rename a spawned or unspawned NPC to any name up to 256 characters.

Can rename a vanilla entity to any name up to 256 characters, and will automatically make the nameplate visible.

Can rename a player to any name up to 16 characters. This will affect only the player's nameplate.

Optionally specify 'per_player' to reprocess the input tags for each player when renaming a vanilla entity
(meaning, if you use "- rename <player.name> t:<[someent]> per_player", every player will see their own name on that entity).
A per_player rename will remain active until the entity is renamed again or the server is restarted.
Rename to "cancel" per_player to intentionally end a per_player rename.
Optionally specify "for:" a list of players when using per_player.

Optionally specify 'list_name_only' to only change the tab list name for a player. Works with 'per_player'.
Related Tags<EntityTag.name> Returns the name of the entity. (...)
<NPCTag.nickname> Returns the NPC's display name, as set by the Nickname trait (or the default NPC name).
Usage Example
# Use to rename the linked NPC to 'Bob'.
- rename Bob
Usage Example
# Use to rename a different NPC to 'Bob'.
- rename Bob t:<[some_npc]>
Usage Example
# Use to make an entity show players their own name for 10 seconds.
- rename <green><player.name> t:<[some_entity]> per_player
- wait 10s
- rename cancel t:<[some_entity]> per_player
Groupentity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/RenameCommand.java#L41