Class NIGHT_VISION
NIGHT_VISION applies Minecraft's NIGHT_VISION potion effect to enhance the target player's vision in dark environments. The effect allows the player to see clearly as if it were daytime, even in complete darkness or underground. The effect is powered by the Minecraft potion effect system with strength (amplifier) set to 1. The effect is detectable by both mind-reading spells (Legilimens) and information spells (Informous) which report the target "can see in darkness".
- See Also:
-
Field Summary
Fields inherited from class net.pottercraft.ollivanders2.effect.O2Effect
affectedPlayerText, duration, effectType, informousText, kill, legilimensText, p, permanent, targetID -
Constructor Summary
ConstructorsConstructorDescriptionNIGHT_VISION(@NotNull Ollivanders2 plugin, int duration, boolean isPermanent, @NotNull UUID pid) Constructor for creating a night vision potion effect. -
Method Summary
Modifier and TypeMethodDescriptionvoiddoRemove()Perform cleanup when the night vision effect is removed.Methods inherited from class net.pottercraft.ollivanders2.effect.PotionEffectSuper
checkEffect, getPotionEffectType, getStrength, setPermanent, setStrengthMethods inherited from class net.pottercraft.ollivanders2.effect.O2Effect
age, getAffectedPlayerText, getInformousText, getLegilimensText, getMaxDuration, getMinDuration, getRemainingDuration, getTargetID, isKilled, isPermanent, kill
-
Constructor Details
-
NIGHT_VISION
public NIGHT_VISION(@NotNull @NotNull Ollivanders2 plugin, int duration, boolean isPermanent, @NotNull @NotNull UUID pid) Constructor for creating a night vision potion effect.Creates a potion effect that enhances the target player's vision in darkness using Minecraft's NIGHT_VISION potion effect type. Sets detection text for both mind-reading spells (Legilimens) and information spells (Informous) to "can see in darkness".
- Parameters:
plugin- a callback to the MC pluginduration- the duration in ticks, snapped to min of 2 minutes, max of 5 minutesisPermanent- ignored - potion effects cannot be permanentpid- the unique ID of the player to grant night vision
-
-
Method Details
-
doRemove
public void doRemove()Perform cleanup when the night vision effect is removed.The default implementation does nothing, as NIGHT_VISION is a potion effect whose effects are automatically managed by the Minecraft potion system. When the effect expires or is manually removed, the player's vision returns to normal.
-