Class HARMONIA_NECTERE_PASSUS

java.lang.Object
net.pottercraft.ollivanders2.spell.O2Spell
net.pottercraft.ollivanders2.spell.HARMONIA_NECTERE_PASSUS

public final class HARMONIA_NECTERE_PASSUS extends O2Spell
Creates a pair of vanishing cabinets for teleportation between two locations.

The spell requires two properly configured vanishing cabinet signs. Each sign must contain the world name and XYZ coordinates of the other cabinet on four separate lines. When cast on a sign, the spell creates a pair of stationary vanishing cabinets that allow players to teleport between them.

The spell validates:

  • Target block is a sign
  • Sign contains valid destination coordinates
  • To and from locations are different
  • No vanishing cabinet already exists at either location
See Also:
  • Constructor Details

    • HARMONIA_NECTERE_PASSUS

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

      public HARMONIA_NECTERE_PASSUS(@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 vanishing cabinets when spell hits a valid sign target.

      Validates the target sign and creates a pair of stationary vanishing cabinets if all requirements are met. Sends appropriate failure messages to the caster if validation fails.

      Validation checks:

      • Target block is a sign (O2Spell.getTargetBlock())
      • Sign contains valid destination coordinates via getSignLocation(Block)
      • From and to locations are different (cannot create self-referential cabinet)
      • No stationary vanishing cabinet already exists at either location

      If all checks pass, creates two stationary HARMONIA_NECTERE_PASSUS spells (one at each location) that enable bidirectional teleportation.

      Specified by:
      doCheckEffect in class O2Spell