Skip to content

Potion Effect Spell

JasperLorelai edited this page Jul 27, 2023 · 17 revisions

Source Code

spell-class: ".targeted.PotionEffectSpell"

Description:

A targeted spell that applies a potion effect to a target or the caster.

Configuration:

Option Description Default Value
type The type of potion to use. List of potion effects can be found here speed
duration How long, in ticks, to apply the potion effect for. 0
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. 0
hidden Makes the potion swirls invisible if turned on. false
ambient Makes the potion swirls more translucent if turned on. false
targeted By default this spell targets the caster. Set to true to make it target the targeted entity. false
override Override existing effect type. false
spell-power-affects-duration Whether spell power should affect the duration. true
spell-power-affects-strength Whether spell power should affect the potion strength. true

Example:

Potion:
    spell-class: ".targeted.PotionEffectSpell"
    type: speed
    duration: 80
    strength: 1
    can-target: caster
    ambient: false
    hidden: true

Different formats for the potion effects.

test:
  spell-class: ".targeted.PotionEffectSpell"
  potion-effects:
    # <effect> <duration> <strength> <ambient> <hidden> <icon>
    - speed 100 4 false false true
    # Flow style section
    - {type: speed, duration: 100, strength: 4, ambient: false, hidden: false, icon: true}
    # Block style section
    - type: speed
      duration: 100
      strength: 4
      ambient: false
      hidden: false
      icon: true
Clone this wiki locally