Class WEAKNESS


public class WEAKNESS extends PotionEffectSuper
Weakness potion effect that reduces the affected player's melee attack damage.

WEAKNESS applies Minecraft's WEAKNESS potion effect to decrease the target player's physical attack damage. The effect reduces the damage dealt by melee attacks, making the affected player less effective in combat. 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 "feels weak". The player receives a notification of "You feel weak." when the effect is applied.

See Also:
  • Constructor Details

    • WEAKNESS

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

      Creates a potion effect that reduces the target player's melee attack damage using Minecraft's WEAKNESS potion effect type with strength 1. Sets detection text for both mind-reading spells (Legilimens) and information spells (Informous) to "feels weak", and notifies the player "You feel weak." when the effect is applied.

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

    • doRemove

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

      The default implementation does nothing, as WEAKNESS 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 attack damage returns to normal.

      Specified by:
      doRemove in class O2Effect