Class SLEEP_SPEECH


public class SLEEP_SPEECH extends BABBLING
Speech replacement effect that makes the sleeping player produce sleep-related sounds instead of speaking.

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:
  • 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 plugin
      duration - the duration parameter (unused for permanent effects)
      isPermanent - ignored - sleep speech is always permanent
      pid - 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.

      Overrides:
      doRemove in class BABBLING
    • setPermanent

      public void setPermanent(boolean perm)
      always permanent
      Overrides:
      setPermanent in class O2Effect
      Parameters:
      perm - ignored - this is always true