Class ALIQUAM_FLOO
java.lang.Object
net.pottercraft.ollivanders2.spell.O2Spell
net.pottercraft.ollivanders2.spell.ALIQUAM_FLOO
Spell that registers fireplaces with the Floo Network for magical transportation.
When cast at a fire or campfire with a sign above it, the spell reads the sign (4 lines) to get the fireplace name and registers it as a permanent Floo Network entry. Players can then use Floo Powder to travel to this fireplace. The fireplace name is checked for duplicates to prevent overwriting existing entries.
- See Also:
-
Field Summary
Fields inherited from class net.pottercraft.ollivanders2.spell.O2Spell
branch, cooldownMessage, defaultRadius, flavorText, isAllowedFailureMessage, location, maxProjectileDistance, maxSpellLifetime, noProjectile, player, rightWand, spellMasteryLevel, spellType, text, usesModifier, vector -
Constructor Summary
ConstructorsConstructorDescriptionALIQUAM_FLOO(@NotNull Ollivanders2 plugin, @NotNull org.bukkit.entity.Player player, @NotNull Double rightWand) Constructor.ALIQUAM_FLOO(Ollivanders2 plugin) Default constructor for use in generating spell text. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidRegisters a fireplace with the Floo Network if the target is a fire/campfire with a sign above it.Methods inherited from class net.pottercraft.ollivanders2.spell.O2Spell
checkEffect, getCloseEntities, getCoolDown, getFailureMessage, getFlavorText, getLevel, getLifeTicks, getMagicBranch, getName, getNearbyDamageableEntities, getNearbyItems, getNearbyLivingEntities, getNearbyPlayers, getSuccessMessage, getTargetBlock, getText, getWorldGuardFlags, hasHitTarget, isAtMaxDistance, isKilled, isSpellAllowed, kill, move, revert, sendFailureMessage, sendSuccessMessage, setUsesModifier
-
Constructor Details
-
ALIQUAM_FLOO
Default constructor for use in generating spell text. Do not use to cast the spell.- Parameters:
plugin- the Ollivanders2 plugin
-
ALIQUAM_FLOO
public ALIQUAM_FLOO(@NotNull @NotNull Ollivanders2 plugin, @NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull Double rightWand) Constructor.- Parameters:
plugin- a callback to the MC pluginplayer- the player who cast this spellrightWand- which wand the player was using
-
-
Method Details
-
doCheckEffect
protected void doCheckEffect()Registers a fireplace with the Floo Network if the target is a fire/campfire with a sign above it.Checks that the projectile hit a fire or campfire block, reads the four-line sign above it for the fireplace name, verifies no duplicate names exist, and creates a permanent stationary spell to represent the registered fireplace on the network.
- Specified by:
doCheckEffectin classO2Spell
-