Class CONFUSION


public class CONFUSION extends PotionEffectSuper
Effect that applies the Minecraft nausea potion effect to simulate disorientation and confusion.

The CONFUSION effect applies Minecraft's native NAUSEA potion effect to the target player, causing visual disorientation that simulates magical confusion. This effect inherits from PotionEffectSuper and uses the randomized duration mechanism where the actual duration applied is calculated as: baseTime × random multiplier (between 1-5).

Mechanism:

  • Applies Minecraft PotionEffectType.NAUSEA to the player
  • Strength set to 1 (full nausea effect amplifier)
  • Duration randomized: baseTime × (random 1-5 multiplier)
  • Detectable by both information spells (Informous) and mind-reading spells (Legilimens)
  • Detection text: "feels confused"
See Also:
  • Constructor Details

    • CONFUSION

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

      Creates an effect that applies the Minecraft NAUSEA potion effect to the target player. The duration parameter is used as the base time; the actual duration applied will be randomized by the parent class (baseTime × random multiplier between 1-5). Sets strength to 1 for full nausea effect amplification and detection text to "feels confused".

      Parameters:
      plugin - a callback to the 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 confuse
  • Method Details

    • doRemove

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

      The default implementation does nothing, as potion effect removal is handled by the parent class (PotionEffectSuper). When this effect is removed, the NAUSEA potion effect is automatically stripped from the player by the parent class.

      Specified by:
      doRemove in class O2Effect