Class ThrownPotionStationarySpell
java.lang.Object
net.pottercraft.ollivanders2.stationaryspell.O2StationarySpell
net.pottercraft.ollivanders2.stationaryspell.ThrownPotionStationarySpell
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
HERBICIDE
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 Summary
ConstructorsConstructorDescriptionThrownPotionStationarySpell(@NotNull Ollivanders2 plugin) Simple constructor used for deserializing saved stationary spells at server start.ThrownPotionStationarySpell(@NotNull Ollivanders2 plugin, @NotNull UUID pid, @NotNull org.bukkit.Location location) Simple constructor used for deserializing saved stationary spells at server start. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidChecks world guard, if enabled, to determine if this spell can be cast here by this player.Methods inherited from class net.pottercraft.ollivanders2.stationaryspell.O2StationarySpell
age, age, ageByPercent, checkSpellDeserialization, decreaseRadius, flair, getBlock, getCasterID, getDuration, getLivingEntitiesInsideSpellRadius, getLocation, getMaxDuration, getMaxRadius, getMinDuration, getMinRadius, getPlayersInsideSpellRadius, getRadius, getSpellType, increaseDuration, increaseRadius, isActive, isKilled, isLocationInside, isPermanent, kill, setActive, upkeep
-
Constructor Details
-
ThrownPotionStationarySpell
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 pluginpid- the player who cast the spelllocation- 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
-