Class LAUGHING
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:
-
Field Summary
Fields inherited from class net.pottercraft.ollivanders2.effect.BABBLING
dictionaryFields inherited from class net.pottercraft.ollivanders2.effect.O2Effect
affectedPlayerText, duration, effectType, informousText, kill, legilimensText, p, permanent, targetID -
Constructor Summary
ConstructorsConstructorDescriptionLAUGHING(@NotNull Ollivanders2 plugin, int duration, boolean isPermanent, @NotNull UUID pid) Constructor for creating an uncontrollable laughing effect. -
Method Summary
Methods inherited from class net.pottercraft.ollivanders2.effect.BABBLING
checkEffect, doRemoveMethods inherited from class net.pottercraft.ollivanders2.effect.O2Effect
age, getAffectedPlayerText, getInformousText, getLegilimensText, getMaxDuration, getMinDuration, getRemainingDuration, getTargetID, isKilled, isPermanent, kill, setPermanent
-
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 pluginduration- the duration of the laughing effect in game ticksisPermanent- is this effect permanent (does not age)pid- the unique ID of the player to afflict with uncontrollable laughing
-