Class StationarySpell

java.lang.Object
net.pottercraft.ollivanders2.spell.O2Spell
net.pottercraft.ollivanders2.spell.StationarySpell
Direct Known Subclasses:
CAVE_INIMICUM, COLLOPORTUS, LUMOS_FERVENS, MOLLIARE, MUFFLIATO, NULLUM_APPAREBIT, NULLUM_EVANESCUNT, PROTEGO_HORRIBILIS, PROTEGO_MAXIMA, PROTEGO_TOTALUM, REPELLO_MUGGLETON

public abstract class StationarySpell extends O2Spell
Parent class for all spells that create a stationary spell.
  • Constructor Details

    • StationarySpell

      public StationarySpell(Ollivanders2 plugin)
      Default constructor for use in generating spell text. Do not use to cast the spell.
      Parameters:
      plugin - the Ollivanders2 plugin
    • StationarySpell

      public StationarySpell(@NotNull @NotNull Ollivanders2 plugin, @NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull Double rightWand)
      Constructor.
      Parameters:
      plugin - a callback to the MC plugin
      player - the player who cast this spell
      rightWand - which wand the player was using
  • Method Details

    • doCheckEffect

      protected void doCheckEffect()
      Create the stationary spell with duration and radius based on the caster's skill.
      Specified by:
      doCheckEffect in class O2Spell
    • createStationarySpell

      @Nullable protected abstract @Nullable O2StationarySpell createStationarySpell()
      Create the stationary spell. Has to be overridden by child spells to have effect.
      Returns:
      the stationary spell or null if one is not created.