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 1 out of 644 mechanisms...
Namepotion_effects
ObjectEntityTag
InputListTag
Related Tags<EntityTag.effects_data> Returns the active potion effects on the entity, in the MapTag format of the mechanism.
<EntityTag.list_effects> Deprecated in favor of Tag:EntityTag.effects_data
<EntityTag.has_effect[<effect>]> Returns whether the entity has a specified effect. (...)
DescriptionSet the entity's active potion effects.
Each item in the list must be a MapTag with keys:
"type" - from 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html
"amplifier" - number to increase the level by (0 for default level 1)
"duration" - DurationTag, how long it lasts
"ambient", "particles", "icon" - booleans

For example: [type=SPEED;amplifier=0;duration=120t;ambient=false;particles=true;icon=true]
This example would be a level 1 swiftness potion that lasts 120 ticks.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityPotionEffects.java#L156