Class NIGHT_VISION


public class NIGHT_VISION extends PotionEffectSuper
Night vision potion effect that allows the player to see clearly in darkness.

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:
  • 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 plugin
      duration - the duration in ticks, snapped to min of 2 minutes, max of 5 minutes
      isPermanent - ignored - potion effects cannot be permanent
      pid - 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.

      Specified by:
      doRemove in class O2Effect