Denizen Script Mechanisms


Mechanisms are found in object properties, the 'adjust' command, and similar. These are used to change the state of an object.
Learn about how mechanisms work in The Beginner's Guide.


Showing all 18 mechanisms...

Categories:

client Mechanisms | EntityTag Mechanisms | FlaggableObject Mechanisms | ImageTag Mechanisms | system Mechanisms | ItemTag Mechanisms | MaterialTag Mechanisms



Category: client Mechanisms


Nameclimbing_speed
Objectclient
InputElementTag(Decimal)
Related Tags<client.climbing_speed> Returns the client's climbing speed.
DescriptionSets the client's climbing speed.
Sourcehttps://github.com/DenizenScript/Clientizen/blob/master/src/main/java/com/denizenscript/clientizen/tags/ClientTagBase.java#L182



Category: EntityTag Mechanisms


Nameglow_color_override
ObjectEntityTag
InputColorTag
Related Tags<EntityTag.glow_color_override> Returns the entity's glow color override, if any. (...)
DescriptionSets the entity's glow color override.
Provide no input to unset.
Note that this is Clientizen data, see Language:Client-side entity data for more information.
Generated Example
- adjust <client.self_entity> glow_color_override:blue
Sourcehttps://github.com/DenizenScript/Clientizen/blob/master/src/main/java/com/denizenscript/clientizen/objects/EntityTag.java#L266

Nameis_sneaking
ObjectEntityTag
InputElementTag(Boolean)
Related Tags<EntityTag.is_sneaking> (Property) Whether an entity is sneaking. (...)
Description(Property) Whether an entity is sneaking.
For most entities this just makes the name tag less visible, and doesn't actually update the pose.
Generated Example
- adjust <client.self_entity> is_sneaking:true
GroupProperties
Sourcehttps://github.com/DenizenScript/Clientizen/blob/master/src/main/java/com/denizenscript/clientizen/objects/properties/entity/EntitySneaking.java#L11

Nameis_sprinting
ObjectEntityTag
InputElementTag(Boolean)
Related Tags<EntityTag.is_sprinting> (Property) Returns whether an entity is sprinting.
Description(Property) Sets whether an entity is sprinting.
While this can be set for all entities, it only has an effect on the client's player.
Generated Example
- adjust <client.self_entity> is_sprinting:true
GroupProperties
Sourcehttps://github.com/DenizenScript/Clientizen/blob/master/src/main/java/com/denizenscript/clientizen/objects/properties/entity/EntitySprinting.java#L11

Namesheared
ObjectEntityTag
InputElementTag(Boolean)
Related Tags<EntityTag.sheared> (Property) Whether a sheep is sheared.
Description(Property) Whether a sheep is sheared.
Generated Example
- adjust <client.self_entity> sheared:true
GroupProperties
Sourcehttps://github.com/DenizenScript/Clientizen/blob/master/src/main/java/com/denizenscript/clientizen/objects/properties/entity/EntitySheared.java#L10



Category: FlaggableObject Mechanisms


Nameclean_flags
ObjectFlaggableObject
InputNone
DescriptionCleans any expired flags from the object.
Generally doesn't need to be called, using the 'skip flag cleanings' setting was enabled.
This is an internal/special case mechanism, and should be avoided where possible.
Does not function on all flaggable objects, particularly those that just store their flags into other objects.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/flags/AbstractFlagTracker.java#L123



Category: ImageTag Mechanisms


Namescale
ObjectImageTag
InputMapTag
Related Tags<ImageTag.width> Returns the image's width (in pixels).
<ImageTag.height> Returns the image's height (in pixels).
DescriptionRescales an image.
The input is a ObjectType:MapTag with "width" and "height" keys.
Both are optional, and default to the image's current respective value.
Example
# Rescales an image to be 50x50
- adjust def:image scale:[width=50;height=50]
Example
# Makes an image taller, keeping its existing width.
- adjust def:short_image scale:[height=100]
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ImageTag.java#L245



Category: system Mechanisms


Namecancel_runlater
Objectsystem
InputElementTag
DescriptionCancels a task scheduled in Command:runlater by its specified unique ID.
If the ID isn't in use, will silently do nothing.
Use Tag:util.runlater_ids to check whether there is already a scheduled task with the given ID.
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L1030

Namecleanmem
Objectsystem
InputNone
Related Tags<util.ram_free> How much RAM is unused but available on the server, in bytes (free memory).
DescriptionSuggests to the internal systems that it's a good time to clean the memory.
Does NOT force a memory cleaning.
This should generally not be used unless you have a very good specific reason to use it.
Generated Example
- adjust system cleanmem
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L1064

Namedelete_file
Objectsystem
InputElementTag
Related Tags<util.has_file[<file>]> Returns true if the specified file exists. The starting path is /plugins/Denizen.
DescriptionDeletes the given file from the server.
File path starts in the Denizen folder.
Require config file setting "Commands.Delete.Allow file deletion".
Example
- adjust system delete_file:data/logs/latest.txt
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L1079

Nameredirect_logging
Objectsystem
InputElementTag(Boolean)
DescriptionTells the server to redirect logging to a world event or not.
Note that this redirects *all console output* not just Denizen output.
Note: don't enable /denizen debug -e while this is active.
Requires config file setting "Debug.Allow console redirection"!
Example
- adjust system redirect_logging:true
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L1005

Namereset_event_stats
Objectsystem
InputNone
Related Tags<util.event_stats> Returns a simple debuggable stats report for all ScriptEvents during this server session.
<util.event_stats_data> Returns the raw data for Tag:util.event_stats, as a ListTag of MapTags.
DescriptionResets the statistics on events used for Tag:util.event_stats
Generated Example
- adjust system reset_event_stats
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/tags/core/UtilTagBase.java#L1046



Category: ItemTag Mechanisms


Namedurability
ObjectItemTag
InputElementTag(Number)
Related Tags<ItemTag.durability> (Property) The amount of durability an item lost.
Description(Property) The amount of durability an item lost.
Generated Example
- adjust <client.self_entity.item_in_hand> durability:4
GroupProperties
Sourcehttps://github.com/DenizenScript/Clientizen/blob/master/src/main/java/com/denizenscript/clientizen/objects/properties/item/ItemDurability.java#L9



Category: MaterialTag Mechanisms


Namehalf
ObjectMaterialTag
InputElementTag
Related Tags<MaterialTag.half> (Property) The current half for a bisected material (like a door, double-plant, chest, or a bed). (...)
Description(Property) The current half for a bisected material (like a door, double-plant, chest, or a bed).
Output for "double" (2 block tall) blocks (doors/double plants/...) is "BOTTOM" or "TOP".
Output for beds is "HEAD" or "FOOT".
Output for chests is "LEFT" or "RIGHT".
GroupProperties
Sourcehttps://github.com/DenizenScript/Clientizen/blob/master/src/main/java/com/denizenscript/clientizen/objects/properties/material/MaterialHalf.java#L10

Nameinstrument
ObjectMaterialTag
InputElementTag
Related Tags<MaterialTag.instrument> (Property) The instrument played by a note block, see 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Instrument.html
Description(Property) The instrument played by a note block, see 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Instrument.html
GroupProperties
Sourcehttps://github.com/DenizenScript/Clientizen/blob/master/src/main/java/com/denizenscript/clientizen/objects/properties/material/MaterialInstrument.java#L9

Namelevel
ObjectMaterialTag
InputElementTag(Number)
Related Tags<MaterialTag.level> (Property) The current level for a "levelled" material: (...)
Description(Property) The current level for a "levelled" material:
For light blocks, this is the brightness of the light.
For water/lava this is the height of the liquid block.
For cauldrons, this is the amount of liquid contained.
For cake, this is the number of bites left.
For beehives/bee nests, this is the amount of honey contained.
For snow, this is the number of partial layers, or the height, of a snow block.
For farmland, this is the moisture level.
For composters, this is the amount of compost.
Generated Example
- adjust <material[stone]> level:3
GroupProperties
Sourcehttps://github.com/DenizenScript/Clientizen/blob/master/src/main/java/com/denizenscript/clientizen/objects/properties/material/MaterialLevel.java#L11

Nameswitched
ObjectMaterialTag
InputElementTag(Boolean)
Related Tags<MaterialTag.switched> (Property) Whether a material is 'switched on', which has different semantic meaning depending on the material type. (...)
Description(Property) Whether a material is 'switched on', which has different semantic meaning depending on the material type.
More specifically, this is whether:
- a Powerable material (like pressure plates) is activated
- an Openable material (like doors) is open
- a dispenser is powered and should dispense its contents
- a daylight sensor is inverted (detects darkness instead of light)
- a lightable block is lit
- a piston block is extended
- an end portal frame has an ender eye in it
- a hopper is NOT being powered by redstone
- a sculk_shrieker can summon a warden
Generated Example
- adjust <material[stone]> switched:true
GroupProperties
Sourcehttps://github.com/DenizenScript/Clientizen/blob/master/src/main/java/com/denizenscript/clientizen/objects/properties/material/MaterialSwitched.java#L9

Namewaterlogged
ObjectMaterialTag
InputElementTag(Boolean)
Related Tags<MaterialTag.waterlogged> (Property) Whether a block is waterlogged.
Description(Property) Whether a block is waterlogged.
Generated Example
- adjust <material[stone]> waterlogged:true
GroupProperties
Sourcehttps://github.com/DenizenScript/Clientizen/blob/master/src/main/java/com/denizenscript/clientizen/objects/properties/material/MaterialWaterlogged.java#L9