public class HARM extends PotionEffectSuper
Instant damage potion effect that harms the affected player.

HARM applies Minecraft's INSTANT_DAMAGE potion effect to inflict sudden damage to the target player. Unlike the BURNING effect which inflicts periodic damage over time, HARM delivers its damage instantly when applied. The effect is powered by the Minecraft potion effect system with strength (amplifier) set to 1, determining the damage magnitude. The effect is detectable by mind-reading spells (Legilimens) which report the target "feels unwell".

See Also:
  • Constructor Details

    • HARM

      public HARM(@NotNull @NotNull Ollivanders2 plugin, int duration, boolean isPermanent, @NotNull @NotNull UUID pid)
      Constructor for creating an instant damage potion effect.

      Creates a potion effect that applies instant damage to the target player using Minecraft's INSTANT_DAMAGE potion effect type. The effect is detected by information spells as the target "feels unwell".

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

    • doRemove

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

      The default implementation does nothing, as INSTANT_DAMAGE is an instant potion effect with no persistent state to clean up. The damage is applied immediately when the effect is created, so no additional cleanup is required on removal.

      Specified by:
      doRemove in class O2Effect