Class SLEEP_SPEECH
SLEEP_SPEECH is a permanent debilitating effect that replaces the target player's chat messages with sleep-related vocalizations. Instead of speaking normally, the affected player produces a limited dictionary of sleeping sounds (snoring, mumbling, sleep murmurs) for communication. Each chat message is replaced with a single randomly-selected sleep sound from the custom dictionary. The effect extends the BABBLING mechanism to provide specialized speech replacement for sleeping players. This is typically applied as a secondary symptom during sleep or unconsciousness effects.
Speech Replacement Configuration:
- Custom sleep sound dictionary: snoring, mumbling, incoherent mumbling, varied sleep sounds
- Dictionary size: 4 unique sleep vocalizations (all in italic formatting)
- Maximum words per message: 1 (only one sound produced per chat attempt)
- Permanent effect: true (duration-independent, applies immediately)
- Effect type: SLEEP_SPEECH
- 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
ConstructorsConstructorDescriptionSLEEP_SPEECH(@NotNull Ollivanders2 plugin, int duration, boolean isPermanent, @NotNull UUID pid) Constructor for creating a sleep speech effect. -
Method Summary
Modifier and TypeMethodDescriptionvoiddoRemove()Perform cleanup when the sleep speech effect is removed.voidsetPermanent(boolean perm) always permanentMethods inherited from class net.pottercraft.ollivanders2.effect.BABBLING
checkEffectMethods inherited from class net.pottercraft.ollivanders2.effect.O2Effect
age, getAffectedPlayerText, getInformousText, getLegilimensText, getMaxDuration, getMinDuration, getRemainingDuration, getTargetID, isKilled, isPermanent, kill
-
Constructor Details
-
SLEEP_SPEECH
public SLEEP_SPEECH(@NotNull @NotNull Ollivanders2 plugin, int duration, boolean isPermanent, @NotNull @NotNull UUID pid) Constructor for creating a sleep speech effect.Creates a speech replacement effect that makes the sleeping player produce sleep-related sounds instead of normal chat messages. Sets up the custom sleep sound dictionary with snoring, mumbling, and sleep vocalizations. The effect is permanent and applies immediately when created.
- Parameters:
plugin- a callback to the MC pluginduration- the duration parameter (unused for permanent effects)isPermanent- ignored - sleep speech is always permanentpid- the unique ID of the sleeping player to affect
-
-
Method Details
-
doRemove
public void doRemove()Perform cleanup when the sleep speech effect is removed.The default implementation does nothing, as the sleep speech effect has no persistent state to clean up. When removed, the player regains normal speech ability.
-
setPermanent
public void setPermanent(boolean perm) always permanent- Overrides:
setPermanentin classO2Effect- Parameters:
perm- ignored - this is always true
-