Class SLEEPING_DRAUGHT

java.lang.Object
net.pottercraft.ollivanders2.potion.O2Potion
net.pottercraft.ollivanders2.potion.SLEEPING_DRAUGHT

public class SLEEPING_DRAUGHT extends O2Potion
Sleeping Draught - causes the drinker to fall into a deep, dreamless sleep.

When consumed, this potion applies the SLEEPING effect to the player for approximately 2 minutes, causing them to fall into a deep, enchanted sleep. While asleep, the player cannot perform most actions and is essentially incapacitated for the duration of the effect.

The sleep can be immediately countered if the player has the AWAKE effect active, which will prevent the sleeping effect from taking hold. This is the primary counter to the Draught of Living Death, which puts players into permanent sleep.

This potion is useful for incapacitating threats temporarily or for puzzle scenarios where sleep is required.

Since:
2.2.8
  • Constructor Details

    • SLEEPING_DRAUGHT

      public SLEEPING_DRAUGHT(@NotNull @NotNull Ollivanders2 plugin)
      Constructor for Sleeping Draught potion.

      Initializes the potion with its ingredients (Lavender Sprig, Flobberworm Mucus, Valerian Sprigs, and Standard Potion Ingredients), description text, flavor text, and potion color. Sets up the SLEEPING effect that will be applied when the potion is consumed for approximately 2 minutes of deep sleep.

      Parameters:
      plugin - a callback to the plugin instance
  • Method Details

    • drink

      public void drink(@NotNull @NotNull org.bukkit.entity.Player player)
      Drink the Sleeping Draught and fall into an enchanted sleep.

      The effect of this potion depends on whether the player has the AWAKE effect:

      • If the player has the AWAKE effect, the potion is harmless and they return to normal consciousness
      • If the player does not have the AWAKE effect, they are put into a deep, dreamless sleep (SLEEPING effect) for approximately 2 minutes. While asleep, they cannot perform most actions and are essentially incapacitated until the effect wears off
      Specified by:
      drink in class O2Potion
      Parameters:
      player - the player who drank the potion
    • getAwakeEffectMessage

      public String getAwakeEffectMessage()
      Get the message shown to players with the AWAKE effect when drinking this potion.

      Returns the special message that is displayed to players who have the AWAKE effect active when they drink the Sleeping Draught. This message indicates that the potion's sleep effect is harmless to them due to their immunity to sleep.

      Returns:
      the message displayed to awakened players ("You yawn, otherwise nothing happens.")