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 10 out of 625 mechanisms...

Categories:

EntityTag Mechanisms | PlayerTag Mechanisms



Category: EntityTag Mechanisms


Nameabsorption_health
ObjectEntityTag
InputElementTag(Decimal)
Related Tags<EntityTag.absorption_health> Returns the living entity's absorption health.
DescriptionSets the living entity's absorption health.
Generated Example
- adjust <player> absorption_health:2
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java#L3385

Namehealth
ObjectEntityTag
InputElementTag(Decimal)
Related Tags<EntityTag.health> Returns the current health of the entity.
<EntityTag.health_max> Returns the maximum health of the entity.
DescriptionSets the amount of health the entity has.
The entity must be living.
Generated Example
- adjust <player> health:-1
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityHealth.java#L228

Namehealth_data
ObjectEntityTag
InputElementTag(Decimal)/ElementTag(Decimal)
Related Tags<EntityTag.health> Returns the current health of the entity.
<EntityTag.health_max> Returns the maximum health of the entity.
DescriptionSets the amount of health the entity has, and the maximum health it has.
The entity must be living.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityHealth.java#L206

Namemax_health
ObjectEntityTag
InputElementTag(Decimal)
Related Tags<EntityTag.health> Returns the current health of the entity.
<EntityTag.health_max> Returns the maximum health of the entity.
DescriptionSets the maximum health the entity may have.
The entity must be living.
Note to change the current health at the same time as max_health (might be needed when setting max health higher rather than lower),
use Mechanism:EntityTag.health_data.
Generated Example
- adjust <player> max_health:0
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityHealth.java#L176



Category: PlayerTag Mechanisms


Namefake_absorption_health
ObjectPlayerTag
InputElementTag(Decimal)
DescriptionShows the player fake absorption health that persists on damage.
Generated Example
- adjust <player> fake_absorption_health:-1
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L2969

Namefake_entity_health
ObjectPlayerTag
InputMapTag
DescriptionShows the player a fake health number for a given entity.
Input is a map with 'entity' as the target entity, and 'health' as the health amount.
Optionally add 'max' to set the max health too.
Using health of '0' can cause an entity to look dead.
For example:
- adjust <player> fake_entity_health:[entity=<player.target>;health=0]
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L3536

Namefake_health
ObjectPlayerTag
InputElementTag(Decimal)(|ElementTag(Number)(|ElementTag(Decimal)))
DescriptionShows the player a fake health bar, with a number between 0 and 20, where 1 is half of a heart.
Use with no input value to reset to the player's normal health.
Optionally, you can specify a fake food level, between 0 and 20.
You can also optionally specify a food saturation level between 0 and 10.
For example:
- adjust <player> fake_health:1
- adjust <player> fake_health:10|15
- adjust <player> fake_health:<player.health>|3|0
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L3455

Namefake_mount_health
ObjectPlayerTag
InputElementTag(Decimal)|ElementTag(Decimal)
DescriptionShows the player a fake health bar for their mounted. Specify both the current and maximum health values.
Use with no input value to reset to the real health value.
Using a health of '0' will make your mount look dead but continue to function.
For example:
- adjust <player> fake_mount_health:10|15
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L3497

Namehealth_scale
ObjectPlayerTag
InputElementTag(Decimal)
Related Tags<PlayerTag.health_scale> Returns the current scale for the player's health bar.
DescriptionSets the 'health scale' on the Player. Each heart equals '2'. The standard health scale is
20, so for example, indicating a value of 40 will display double the amount of hearts
standard.
Player relogging will reset this mechanism.
Generated Example
- adjust <player> health_scale:2
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L2980

Namescale_health
ObjectPlayerTag
InputElementTag(Boolean)
Related Tags<PlayerTag.health_is_scaled> Returns whether the player's health bar is currently being scaled.
DescriptionEnables or disables the health scale value. Disabling will result in the standard
amount of hearts being shown.
Generated Example
- adjust <player> scale_health:false
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L2996