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 173 commands...
NameAdjust
Related Guide Pagehttps://guide.denizenscript.com/guides/basics/mechanisms.html
Syntaxadjust [<ObjectTag>/def:<name>|...] [<mechanism>](:<value>)
Short DescriptionAdjusts an object's mechanism.
Full DescriptionMany object tag types contains options and properties that need to be adjusted. Denizen employs a mechanism
interface to deal with those adjustments. To easily accomplish this, use this command with a valid object
mechanism, and sometimes accompanying value.

Specify "def:<name>" as an input to adjust a definition and automatically save the result back to the definition.

You can optionally adjust a MapTag of mechanisms to values.

To adjust an item in an inventory, use Command:inventory, as '- inventory adjust slot:<#> <mechanism>:<value>'.
Note that that is only for items, not actual inventories.
To adjust an actual InventoryTag mechanism, you should still use the normal 'adjust' command, not 'inventory adjust'.
Related Tags<entry[saveName].result> returns the adjusted object.
<entry[saveName].result_list> returns a ListTag of adjusted objects.
Usage Example
#Use to set a custom display name on an entity.
- adjust <[some_entity]> custom_name:ANGRY!
Usage Example
#Use to set the skin of every online player.
- adjust <server.online_players> skin:Notch
Usage Example
#Use to modify an item held in a definition.
- adjust def:stick "display_name:Fancy stick"
Synonyms (Search Aid)mechanism
Groupcore
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/AdjustCommand.java#L32