Class LAUGHING


public class LAUGHING extends BABBLING
Uncontrollable laughing effect that forces a player to repeatedly laugh.

LAUGHING is a specialized variant of the BABBLING effect that forces the affected player to laugh uncontrollably instead of speaking babbling nonsense. Like BABBLING, this effect applies periodic damage and forces the player to speak messages at random intervals. However, LAUGHING uses a custom dictionary of laugh exclamations (16 different laugh variations) instead of generic babbling words, and is configured with a 50% probability threshold for triggering laughs. The effect displays continuous uncontrollable laughter, creating a humorous but harmful status condition.

Mechanism (inherited from BABBLING):

  • Periodic damage applied every 3 seconds with clamped magnitude (0.5-10 health)
  • Forced speech output at random intervals (1-5 custom laugh messages per damage cycle)
  • 50% probability threshold for triggering laugh messages each cycle
  • Custom laugh dictionary with 16 humorous laugh variations
  • Detectable by information spells (Informous)
  • Detection text: "cannot stop laughing"
See Also:
  • Constructor Details

    • LAUGHING

      public LAUGHING(@NotNull @NotNull Ollivanders2 plugin, int duration, boolean isPermanent, @NotNull @NotNull UUID pid)
      Constructor for creating an uncontrollable laughing effect.

      Creates an effect that forces the target player to laugh uncontrollably by outputting laugh messages periodically. Extends the parent BABBLING class with a custom laugh dictionary (16 laugh variations ranging from simple "hahahaha" to elaborate Wizarding World references) and is configured with 50% probability threshold (affectPercent) and maximum of 1 laugh message (maxWords) per speech cycle. Inherits all damage mechanics from BABBLING: periodic damage every 3 seconds with clamped 0.5-10 damage range.

      Parameters:
      plugin - a callback to the MC plugin
      duration - the duration of the laughing effect in game ticks
      isPermanent - is this effect permanent (does not age)
      pid - the unique ID of the player to afflict with uncontrollable laughing