Class ThrownPotionStationarySpell

java.lang.Object
net.pottercraft.ollivanders2.stationaryspell.O2StationarySpell
net.pottercraft.ollivanders2.stationaryspell.ThrownPotionStationarySpell
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
HERBICIDE

public abstract class ThrownPotionStationarySpell extends O2StationarySpell
Abstract base class for stationary spells created by thrown potions.

Represents lingering potion effects that persist in the world after a potion is thrown. These spells differ from other stationary spells in that they perform WorldGuard permission checks at the time of creation, since the original O2Spell projectile may not perform these checks.

See Also:
  • Constructor Details

    • ThrownPotionStationarySpell

      public ThrownPotionStationarySpell(@NotNull @NotNull Ollivanders2 plugin)
      Simple constructor used for deserializing saved stationary spells at server start. Do not use to cast spell.
      Parameters:
      plugin - a callback to the MC plugin
    • ThrownPotionStationarySpell

      public ThrownPotionStationarySpell(@NotNull @NotNull Ollivanders2 plugin, @NotNull @NotNull UUID pid, @NotNull @NotNull org.bukkit.Location location)
      Simple constructor used for deserializing saved stationary spells at server start. Do not use to cast spell.
      Parameters:
      plugin - a callback to the MC plugin
      pid - the player who cast the spell
      location - the center location of the spell
  • Method Details

    • checkWorldGuard

      protected void checkWorldGuard()
      Checks world guard, if enabled, to determine if this spell can be cast here by this player. Normally stationary spells don't need to check this because they are cast by O2Spells which check this for them but this stationary spell is a thrown potion effect