Name | Cast |
Syntax | cast [<effect>] (remove) (duration:<value>) (amplifier:<#>) (<entity>|...) (no_ambient) (hide_particles) (no_icon) (no_clear) |
Short Description | Casts a potion effect to a list of entities. |
Full Description | Casts 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 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 |
|
Usage Example |
|
Usage Example |
|
Synonyms (Search Aid) | potion, magic |
Group | entity |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/CastCommand.java#L34 |