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...
NamePlayEffect
Syntaxplayeffect [effect:<name>] [at:<location>|...] (data:<#.#>) (special_data:<map>) (visibility:<#.#>) (quantity:<#>) (offset:<#.#>,<#.#>,<#.#>) (targets:<player>|...) (velocity:<vector>)
Short DescriptionPlays a visible or audible effect at the location.
Full DescriptionAllows the playing of particle effects anywhere without the need of the source it comes from originally.
The particles you may use, can come from sources such as a potion effect or a portal/Enderman with their particles respectively.
Some particles have different data which may include different behavior depending on the data. Default data is 0
Specifying a visibility value changes the sight radius of the effect. For example if visibility is 15; Targeted players won't see it unless they are 15 blocks or closer.
You can add a quantity value that allow multiple of the same effect played at the same time. If an offset is set, each particle will be played at a different location in the offset area.
Everyone will see the particle effects unless a target has been specified.
See Language:Particle Effects for a list of valid effect names.

Version change note: The original PlayEffect command raised all location inputs 1 block-height upward to avoid effects playing underground when played at eg a player's location.
This was found to cause too much confusion, so it is no longer on by default. However, it will still happen for older commands.
The distinction is in whether you include the (now expected to use) "at:" prefix on your location argument.
If you do not have this prefix, the system will assume your command is older, and will apply the 1-block height offset.

Some particles will require input to the "special_data" argument. The data input is a MapTag with different keys per particle.
- For DUST particles, the input is of format [size=<size>;color=<color>], e.g. "[size=1.2;color=red]".
- For DUST_COLOR_TRANSITION particles, the input is of format [size=<size>;from=<color>;to=<color>], e.g "[size=1.2;from=red;to=blue]".
- For BLOCK, BLOCK_CRUMBLE, BLOCK_MARKER, DUST_PILLAR, or FALLING_DUST particles, the input is of format [material=<material>], e.g. [material=stone]
- For VIBRATION particles, the input is of format [origin=<location>;destination=<location/entity>;duration=<duration>], for example: [origin=<player.location>;destination=<player.cursor_on>;duration=5s]
- For ITEM particles, the input is of format [item=<item>], e.g. "[item=stick]".
- For TRAIL particles, the input is of format [color=<color>;target=<location>;duration=<duration>], e.g. "[color=red;target=<player.cursor_on>;duration=20s]".
- For ENTITY_EFFECT particles, the input is of format [color=<color>], e.g. "[color=green]".
- For SHRIEK particles, the input is of format [duration=<duration>], e.g. "[duration=1m]".
- For SCULK_CHARGE particles, the input is of format [radians=<element>], e.g. "[radians=<element[90].to_radians>]".

Optionally specify a velocity vector for standard particles to move. Note that this ignores the 'data' input if used.
Related Tags<server.effect_types> Returns a list of all 'effect' types known to the server. (...)
<server.particle_types> Returns a list of all particle effect types known to the server. (...)
Usage Example
# Use to create a fake explosion.
- playeffect effect:EXPLOSION_HUGE at:<player.location> visibility:500 quantity:10 offset:2.0
Usage Example
# Use to play a cloud effect.
- playeffect effect:CLOUD at:<player.location.add[0,5,0]> quantity:20 data:1 offset:0.0
Usage Example
# Use to play some effects at spawn.
- playeffect effect:FIREWORKS_SPARK at:<world[world].spawn_location> visibility:100 quantity:375 data:0 offset:50.0
Usage Example
# Use to spawn a cloud of rainbow-colored ENTITY_EFFECT particles around yourself.
- foreach <util.color_names> as:color:
    - playeffect effect:ENTITY_EFFECT at:<player.eye_location> quantity:25 special_data:[color=<[color]>]
Usage Example
# Use to shoot particles in to the direction you're looking at.
- repeat 10:
    - playeffect effect:TRAIL at:<player.eye_location> quantity:1 offset:0 special_data:[color=red;target=<player.eye_location.ray_trace[default=air]>;duration=5s]
    - wait 1t
Usage Example
# Use to spawn a SCULK_CHARGE effect upside down.
- playeffect effect:SCULK_CHARGE at:<player.eye_location.add[0,1,0]> quantity:1 offset:0 special_data:[radians=<element[180].to_radians>]
Usage Example
# Use to play a SHRIEK effect with a 5-second delay.
- playeffect effect:SHRIEK at:<player.eye_location.add[0,1,0]> quantity:1 special_data:[duration=5s]
Synonyms (Search Aid)particle
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/PlayEffectCommand.java#L55