Class NULLUM_APPAREBIT

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

public class NULLUM_APPAREBIT extends O2StationarySpell
A stationary spell that prevents apparition and teleportation into the protected area.

Nullum Apparebit creates a powerful anti-apparition barrier that prevents outside entities from accessing the protected area through magical means. The spell blocks:

  • Apparation by name into the spell area
  • Apparation by coordinates into the spell area
  • Teleportation into the spell area

This spell creates a magical sanctuary that cannot be breached by apparition or teleportation.

See Also:
  • Field Details

    • feedbackMessage

      public static final String feedbackMessage
      The message a player gets if they try to teleport or apparate in to the spell area
      See Also:
    • minRadiusConfig

      public static final int minRadiusConfig
      Minimum spell radius (5 blocks).
      See Also:
    • maxRadiusConfig

      public static final int maxRadiusConfig
      Maximum spell radius (50 blocks).
      See Also:
    • minDurationConfig

      public static final int minDurationConfig
      Minimum spell duration (5 minutes).
      See Also:
    • maxDurationConfig

      public static final int maxDurationConfig
      Maximum spell duration (30 minutes).
      See Also:
  • Constructor Details

    • NULLUM_APPAREBIT

      public NULLUM_APPAREBIT(@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_APPAREBIT

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

      Creates an anti-apparition barrier at the specified location with the given radius and duration. Outside entities cannot access the protected area through apparition or teleportation.

      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 apparebit 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 apparebit 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)