Class LUMOS_FERVENS
java.lang.Object
net.pottercraft.ollivanders2.stationaryspell.O2StationarySpell
net.pottercraft.ollivanders2.stationaryspell.LUMOS_FERVENS
- All Implemented Interfaces:
Serializable
Bluebell Flames produces harmless blue flames that are waterproof. These flames can be touched, penetrated, and held
without burning the holder, though they can singe materials such as clothing and plants.
- Since:
- 2.21.4
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.bukkit.MaterialThe material for the base block when spell is activestatic final org.bukkit.MaterialThe material for the fire when spell is activestatic final intMaximum spell duration (2 hours).static final intMaximum spell radius (2 blocks).static final intMinimum spell duration (5 minutes).static final intMinimum spell radius (2 blocks). -
Constructor Summary
ConstructorsConstructorDescriptionLUMOS_FERVENS(@NotNull Ollivanders2 plugin) Simple constructor used for deserializing saved stationary spells at server start.LUMOS_FERVENS(@NotNull Ollivanders2 plugin, @NotNull UUID pid, @NotNull org.bukkit.Location location, int radius, int duration) Constructs a new LUMOS_FERVENS spell cast by a player. -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if the spell was properly deserialized and has all required data.org.bukkit.block.BlockGet the base block for this spellorg.bukkit.block.BlockGet the fire block for this spellSerialize all data specific to this spell so it can be saved.voidupkeep()Start the flames if they have not been and age the spell each tickMethods inherited from class net.pottercraft.ollivanders2.stationaryspell.O2StationarySpell
age, age, ageByPercent, decreaseRadius, flair, getBlock, getCasterID, getDuration, getLivingEntitiesInsideSpellRadius, getLocation, getMaxDuration, getMaxRadius, getMinDuration, getMinRadius, getPlayersInsideSpellRadius, getRadius, getSpellType, increaseDuration, increaseRadius, isActive, isKilled, isLocationInside, isPermanent, kill, setActive
-
Field Details
-
minRadiusConfig
public static final int minRadiusConfigMinimum spell radius (2 blocks).- See Also:
-
maxRadiusConfig
public static final int maxRadiusConfigMaximum spell radius (2 blocks).- See Also:
-
minDurationConfig
public static final int minDurationConfigMinimum spell duration (5 minutes).- See Also:
-
maxDurationConfig
public static final int maxDurationConfigMaximum spell duration (2 hours).- See Also:
-
baseBlockMaterial
public static final org.bukkit.Material baseBlockMaterialThe material for the base block when spell is active -
fireBlockMaterial
public static final org.bukkit.Material fireBlockMaterialThe material for the fire when spell is active
-
-
Constructor Details
-
LUMOS_FERVENS
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
-
LUMOS_FERVENS
public LUMOS_FERVENS(@NotNull @NotNull Ollivanders2 plugin, @NotNull @NotNull UUID pid, @NotNull @NotNull org.bukkit.Location location, int radius, int duration) Constructs a new LUMOS_FERVENS spell cast by a player.Creates bluebell flames (soul fire) at the specified location with the given radius and duration. The flames are waterproof and prevent fire damage to entities within the protected area.
- Parameters:
plugin- a callback to the MC plugin (not null)pid- the UUID of the player who cast the spell (not null)location- the center location of the spell (not null)radius- the radius for this spell (will be clamped to min/max values)duration- the duration of the spell in ticks (will be clamped to min/max values)
-
-
Method Details
-
getBaseBlock
public org.bukkit.block.Block getBaseBlock()Get the base block for this spell- Returns:
- the base block
-
getFireBlock
public org.bukkit.block.Block getFireBlock()Get the fire block for this spell- Returns:
- the fire block
-
upkeep
public void upkeep()Start the flames if they have not been and age the spell each tick- Specified by:
upkeepin classO2StationarySpell
-
serializeSpellData
Serialize all data specific to this spell so it can be saved.- Returns:
- a map of the serialized data
-
checkSpellDeserialization
public boolean checkSpellDeserialization()Checks if the spell was properly deserialized and has all required data.Verifies that the spell's player UUID, location, and original material have been properly restored from serialized data during server startup.
- Overrides:
checkSpellDeserializationin classO2StationarySpell- Returns:
- true if the spell has all required deserialized data, false otherwise
-