Class SLEEPING_DRAUGHT
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
-
Field Summary
Fields inherited from class net.pottercraft.ollivanders2.potion.O2Potion
duration, flavorText, ingredients, potionColor, potionSuccessMessage, potionType, text, usesModifier -
Constructor Summary
ConstructorsConstructorDescriptionSLEEPING_DRAUGHT(@NotNull Ollivanders2 plugin) Constructor for Sleeping Draught potion. -
Method Summary
Modifier and TypeMethodDescriptionvoiddrink(@NotNull org.bukkit.entity.Player player) Drink the Sleeping Draught and fall into an enchanted sleep.Get the message shown to players with the AWAKE effect when drinking this potion.Methods inherited from class net.pottercraft.ollivanders2.potion.O2Potion
brew, brewBadPotion, checkRecipe, createPotionItemStack, getFlavorText, getIngredients, getIngredientsText, getLevel, getMagicBranch, getName, getPotionSuccessMessage, getPotionType, getText, setUsesModifier
-
Constructor Details
-
SLEEPING_DRAUGHT
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
-
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.")
-