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...
NameCast
Syntaxcast [<effect>] (remove) (duration:<value>) (amplifier:<#>) (<entity>|...) (no_ambient) (hide_particles) (no_icon) (no_clear)
Short DescriptionCasts a potion effect to a list of entities.
Full DescriptionCasts or removes a potion effect to or from a list of entities.

The effect type must be from 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html.

If you don't specify a duration, it defaults to 60 seconds.
An infinite duration will apply an infinite duration potion effect, refer to ObjectType:DurationTag for more details.

The amplifier is how many levels to *add* over the normal level 1.
If you don't specify an amplifier level, it defaults to 1, meaning an effect of level 2 (this is for historical compatibility reasons).
Specify "amplifier:0" to have no amplifier applied (ie effect level 1).

If no entity is specified, the command will target the linked player.
If there isn't one, the command will target the linked NPC. If there isn't one either, the command will error.

Optionally, specify "no_ambient" to hide some translucent additional particles, while still rendering the main particles.
"Ambient" effects in vanilla come from a beacon, while non-ambient come from a potion.

Optionally, specify "hide_particles" to remove the particle effects entirely.

Optionally, specify "no_icon" to hide the effect icon in the corner of your screen.

Optionally use "no_clear" to prevent clearing any previous effect instance before adding the new one.
Related Tags<EntityTag.has_effect[<effect>]> Returns whether the entity has a specified effect. (...)
<server.potion_effect_types> Returns a list of all potion effects known to the server. (...)
<EntityTag.effects_data> Returns the active potion effects on the entity, in the MapTag format of the mechanism.
Usage Example
# Use to cast a level 1 effect onto the linked player or NPC for 50 seconds.
- cast speed duration:50s amplifier:0
Usage Example
# Use to cast an effect onto the linked player or NPC for an infinite duration with an amplifier of 3 (effect level 4).
- cast jump duration:infinite amplifier:3
Usage Example
# Use to remove an effect from a specific entity.
- cast jump remove <[entity]>
Synonyms (Search Aid)potion, magic
Groupentity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/CastCommand.java#L34