Class SLOWNESS


public class SLOWNESS extends PotionEffectSuper
Movement slowness potion effect that reduces the affected player's movement speed.

SLOWNESS applies Minecraft's SLOWNESS potion effect to decrease the target player's movement and attack speed. The effect reduces how quickly the player can move, making them sluggish and slowing their combat capabilities. 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 sluggish". The player receives a notification of "You feel sluggish." when the effect is applied.

See Also:
  • Constructor Details

    • SLOWNESS

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

      Creates a potion effect that reduces the target player's movement and attack speed using Minecraft's SLOWNESS potion effect type with strength 1. Sets detection text for both mind-reading spells (Legilimens) and information spells (Informous) to "feels sluggish", and notifies the player "You feel sluggish." 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 slow
  • Method Details

    • doRemove

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

      The default implementation does nothing, as SLOWNESS 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 movement speed returns to normal.

      Specified by:
      doRemove in class O2Effect