Class POISON


public class POISON extends PotionEffectSuper
Poison potion effect that causes periodic damage to the affected player.

POISON applies Minecraft's POISON potion effect to inflict periodic damage to the target player. The poison damage diminishes the player's health over time but stops before killing them (damage is reduced when the player reaches critical health). The effect is powered by the Minecraft potion effect system with strength (amplifier) set to 1, determining the poison intensity. The effect is detectable by both mind-reading spells (Legilimens) and information spells (Informous) which report the target "feels sick".

See Also:
  • Constructor Details

    • POISON

      public POISON(@NotNull @NotNull Ollivanders2 plugin, int duration, boolean isPermanent, @NotNull @NotNull UUID pid)
      Constructor for creating a poison potion effect.

      Creates a potion effect that inflicts poison damage to the target player using Minecraft's POISON potion effect type. Sets detection text for both mind-reading spells (Legilimens) and information spells (Informous) to "feels sick".

      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 poison
  • Method Details

    • doRemove

      public void doRemove()
      Perform cleanup when the poison effect is removed.

      The default implementation does nothing, as POISON is a potion effect whose effects are automatically managed by the Minecraft potion system. When the effect expires or is manually removed, the poison damage stops and the player's health remains at its current value.

      Specified by:
      doRemove in class O2Effect