Class NULLUM_EVANESCUNT

java.lang.Object
net.pottercraft.ollivanders2.stationaryspell.O2StationarySpell
net.pottercraft.ollivanders2.stationaryspell.NULLUM_EVANESCUNT
All Implemented Interfaces:
Serializable

public class NULLUM_EVANESCUNT extends O2StationarySpell
A stationary spell that prevents apparition and teleportation out of the protected area.

Nullum Evanescunt creates a powerful anti-disapparition barrier that prevents entities from escaping through magical means. Those trapped inside cannot:

  • Apparate by name to leave the spell area
  • Apparate by coordinates to leave the spell area
  • Teleport away from the spell area

Note: This spell uses min/max constraints from NULLUM_APPAREBIT.

See Also:
  • Field Details

    • feedbackMessage

      public static final String feedbackMessage
      The message a player receives if they try to teleport or apparate out of the area
      See Also:
  • Constructor Details

    • NULLUM_EVANESCUNT

      public NULLUM_EVANESCUNT(@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
    • NULLUM_EVANESCUNT

      public NULLUM_EVANESCUNT(@NotNull @NotNull Ollivanders2 plugin, @NotNull @NotNull UUID pid, @NotNull @NotNull org.bukkit.Location location, int radius, int duration)
      Constructs a new 1 - spell cast by a player.

      Creates an anti-disapparition barrier at the specified location with the given radius and duration. Entities inside the protected area cannot escape through apparition or teleportation magic.

      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

    • upkeep

      public void upkeep()
      Ages the spell by one tick.
      Specified by:
      upkeep in class O2StationarySpell
    • serializeSpellData

      @NotNull public @NotNull Map<String,String> serializeSpellData()
      Serializes the nullum evanescunt spell data for persistence.

      The spell has no extra data to serialize beyond the base spell properties, so this method returns an empty map.

      Returns:
      an empty map (the spell has no custom data to serialize)
    • deserializeSpellData

      public void deserializeSpellData(@NotNull @NotNull Map<String,String> spellData)
      Deserializes nullum evanescunt spell data from saved state.

      The spell has no extra data to deserialize, so this method does nothing.

      Parameters:
      spellData - the serialized spell data map (not used)