Class CAVE_INIMICUM
java.lang.Object
net.pottercraft.ollivanders2.stationaryspell.O2StationarySpell
net.pottercraft.ollivanders2.stationaryspell.ShieldSpell
net.pottercraft.ollivanders2.stationaryspell.ConcealmentShieldSpell
net.pottercraft.ollivanders2.stationaryspell.CAVE_INIMICUM
- All Implemented Interfaces:
Serializable
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.
- Since:
- 2.21
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intmax duration for this spellstatic final intmax radius for this spellstatic final intmin duration for this spellstatic final intmin radius for this spellFields inherited from class net.pottercraft.ollivanders2.stationaryspell.ConcealmentShieldSpell
alarmOnProximity, entryDenyMessages, proximityCooldownLimit, proximityCooldownTimer, proximityRadiusModifier -
Constructor Summary
ConstructorsConstructorDescriptionCAVE_INIMICUM(@NotNull Ollivanders2 plugin) Simple constructor used for deserializing saved stationary spells at server start.CAVE_INIMICUM(@NotNull Ollivanders2 plugin, @NotNull UUID pid, @NotNull org.bukkit.Location location, int radius, int duration) Constructor -
Method Summary
Modifier and TypeMethodDescriptionbooleancanEnter(@NotNull org.bukkit.entity.LivingEntity entity) Can this entity enter the spell area? Assumes the entity being checked is outside the spell area.protected booleancanHear(@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.protected booleancanSee(@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.booleancanTarget(@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.protected booleancheckAlarm(@NotNull org.bukkit.entity.LivingEntity entity) Activate the proximity alarm if there is a player or hostile mob at the location.protected booleancheckAlarm(@NotNull org.bukkit.entity.Player player) Activate the proximity alarm if there is a player at the location.Get the message sent to the caster when proximity is triggered.protected voidDo the proximity alarm action for this spell.Methods inherited from class net.pottercraft.ollivanders2.stationaryspell.ConcealmentShieldSpell
deserializeSpellData, doesAlarmOnProximty, doProximityCheck, getAreaEntryDenialMessage, getEntryDenyMessages, getProximityRadius, handleEntityMove, hidePlayersInSpellArea, isInProximity, serializeSpellData, toggleVisibility, unhidePlayer, unhidePlayersInSpellArea, upkeepMethods inherited from class net.pottercraft.ollivanders2.stationaryspell.O2StationarySpell
age, age, ageByPercent, checkSpellDeserialization, decreaseRadius, flair, getBlock, getCasterID, getDuration, getLivingEntitiesInsideSpellRadius, getLocation, getMaxDuration, getMaxRadius, getMinDuration, getMinRadius, getPlayersInsideSpellRadius, getRadius, getSpellType, increaseDuration, increaseRadius, isActive, isKilled, isLocationInside, isPermanent, kill, setActive
-
Field Details
-
minRadiusConfig
public static final int minRadiusConfigmin radius for this spell- See Also:
-
maxRadiusConfig
public static final int maxRadiusConfigmax radius for this spell- See Also:
-
minDurationConfig
public static final int minDurationConfigmin duration for this spell- See Also:
-
maxDurationConfig
public static final int maxDurationConfigmax duration for this spell- See Also:
-
-
Constructor Details
-
CAVE_INIMICUM
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 pluginpid- the player who cast the spelllocation- the center location of the spellradius- the radius for this spellduration- 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:
canSeein classConcealmentShieldSpell- 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:
canTargetin classConcealmentShieldSpell- 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:
canEnterin classConcealmentShieldSpell- 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:
canHearin classConcealmentShieldSpell- 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:
checkAlarmin classConcealmentShieldSpell- 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:
checkAlarmin classConcealmentShieldSpell- 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:
proximityAlarmin classConcealmentShieldSpell
-
getProximityAlarmMessage
Get the message sent to the caster when proximity is triggered.- Returns:
- the proximity alarm message
-