Class CAVE_INIMICUM

All Implemented Interfaces:
Serializable

public class CAVE_INIMICUM extends ConcealmentShieldSpell
Cave Inimicum produces a boundary that keeps the caster hidden from view. Those who were on the other side of the shield are not able to see, hear, or (if the spell was well cast) smell them.

CAVE_INIMICUM

Since:
2.21
See Also:
  • Field Details

    • minRadiusConfig

      public static final int minRadiusConfig
      min radius for this spell
      See Also:
    • maxRadiusConfig

      public static final int maxRadiusConfig
      max radius for this spell
      See Also:
    • minDurationConfig

      public static final int minDurationConfig
      min duration for this spell
      See Also:
    • maxDurationConfig

      public static final int maxDurationConfig
      max duration for this spell
      See Also:
  • Constructor Details

    • CAVE_INIMICUM

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

      public CAVE_INIMICUM(@NotNull @NotNull Ollivanders2 plugin, @NotNull @NotNull UUID pid, @NotNull @NotNull org.bukkit.Location location, int radius, int duration)
      Constructor
      Parameters:
      plugin - a callback to the MC plugin
      pid - the player who cast the spell
      location - the center location of the spell
      radius - the radius for this spell
      duration - the duration of the spell
  • Method Details

    • canSee

      protected boolean canSee(@NotNull @NotNull org.bukkit.entity.LivingEntity entity)
      Can this entity see players inside the spell area? Assumes the entity being checked is outside the spell area.
      Specified by:
      canSee in class ConcealmentShieldSpell
      Parameters:
      entity - the entity looking inside the area
      Returns:
      false, this spell conceals players in the area from everyone
    • canTarget

      public boolean canTarget(@NotNull @NotNull org.bukkit.entity.LivingEntity entity)
      Can this entity target players inside the spell area? Assumes the entity being checked is outside the spell area.
      Specified by:
      canTarget in class ConcealmentShieldSpell
      Parameters:
      entity - the entity targeting inside the area
      Returns:
      true, this spell does not affect targeting
    • canEnter

      public boolean canEnter(@NotNull @NotNull org.bukkit.entity.LivingEntity entity)
      Can this entity enter the spell area? Assumes the entity being checked is outside the spell area.
      Specified by:
      canEnter in class ConcealmentShieldSpell
      Parameters:
      entity - the entity entering the area
      Returns:
      true, this spell does not block entry in to the spell area
    • canHear

      protected boolean canHear(@NotNull @NotNull org.bukkit.entity.LivingEntity entity)
      Can this entity "hear" sounds from inside the spell area? Assumes the entity being checked is outside the spell area.
      Specified by:
      canHear in class ConcealmentShieldSpell
      Parameters:
      entity - the entity entering the area
      Returns:
      false, this spell conceals players in the area from everyone
    • checkAlarm

      protected boolean checkAlarm(@NotNull @NotNull org.bukkit.entity.Player player)
      Activate the proximity alarm if there is a player at the location. Assumes that a check to determine that a proximity alarm should go off for this location has happened and called this.
      Specified by:
      checkAlarm in class ConcealmentShieldSpell
      Parameters:
      player - the player that triggered the alarm
      Returns:
      true if the alarm conditions are met, false otherwise
    • checkAlarm

      protected boolean checkAlarm(@NotNull @NotNull org.bukkit.entity.LivingEntity entity)
      Activate the proximity alarm if there is a player or hostile mob at the location. Assumes that a check to determine that a proximity alarm should go off for this location has happened and called this.
      Specified by:
      checkAlarm in class ConcealmentShieldSpell
      Parameters:
      entity - the entity that triggered the alarm
      Returns:
      true if the alarm conditions are met, false otherwise
    • proximityAlarm

      protected void proximityAlarm()
      Do the proximity alarm action for this spell.
      Specified by:
      proximityAlarm in class ConcealmentShieldSpell
    • getProximityAlarmMessage

      public String getProximityAlarmMessage()
      Get the message sent to the caster when proximity is triggered.
      Returns:
      the proximity alarm message