PotionEffectSpell - TheComputerGeek2/MagicSpells GitHub Wiki
spell-class: ".targeted.PotionEffectSpell"
targeting
cast argument values:
Value | Supported |
---|---|
entity |
true |
location |
false |
entity_from_location |
false |
Description:
A targeted spell that applies a potion effect to a target or the caster.
Configuration:
Since 4.0 Beta 13 some of these options support dynamic values through numeric or string expressions.
Option | Description | Type | Default | Supports expressions |
---|---|---|---|---|
targeted |
By default this spell targets the caster. Set to true to make it target the targeted entity. | Boolean | false |
true |
override |
Override existing effect type. | Boolean | false |
true |
spell-power-affects-duration |
Whether spell power should affect the duration. | Boolean | true |
false |
spell-power-affects-strength |
Whether spell power should affect the potion strength. | Boolean | true |
false |
Potion Effect Options:
Variant 1:
In this variant only one potion effect can be applied.
Option | Description | Type | Default | Supports expressions |
---|---|---|---|---|
type |
The type of potion to use. List of potion effects can be found here | String | "speed" |
true |
duration |
Defines duration in server ticks. Since 1.19.4 you can use -1 for an infinite duration. |
Integer | 0 |
true |
strength |
The level of potion to apply. This starts at 0, meaning strength: 0 will give a level 1 potion effect. strength: 1 will apply level 2, and so on. |
Integer | 0 |
true |
hidden |
Makes the potion swirls invisible if turned on. | Boolean | false |
true |
ambient |
Makes the potion swirls more translucent if turned on. | Boolean | false |
true |
Example:
Potion:
spell-class: ".targeted.PotionEffectSpell"
type: speed
duration: 80
strength: 1
can-target: caster
ambient: false
hidden: true
Variant 2:
Since 4.0 Beta 12 you can alternatively provide a Potion Effect List.