Class CONFUSION
The CONFUSION effect applies Minecraft's native NAUSEA potion effect to the target player, causing visual disorientation that simulates magical confusion. This effect inherits from PotionEffectSuper and uses the randomized duration mechanism where the actual duration applied is calculated as: baseTime × random multiplier (between 1-5).
Mechanism:
- Applies Minecraft PotionEffectType.NAUSEA to the player
- Strength set to 1 (full nausea effect amplifier)
- Duration randomized: baseTime × (random 1-5 multiplier)
- Detectable by both information spells (Informous) and mind-reading spells (Legilimens)
- Detection text: "feels confused"
- See Also:
-
Field Summary
Fields inherited from class net.pottercraft.ollivanders2.effect.O2Effect
affectedPlayerText, duration, effectType, informousText, kill, legilimensText, p, permanent, targetID -
Constructor Summary
ConstructorsConstructorDescriptionCONFUSION(@NotNull Ollivanders2 plugin, int duration, boolean isPermanent, @NotNull UUID pid) Constructor for creating a confusion (nausea) potion effect. -
Method Summary
Modifier and TypeMethodDescriptionvoiddoRemove()Perform cleanup when the confusion effect is removed.Methods inherited from class net.pottercraft.ollivanders2.effect.PotionEffectSuper
checkEffect, getPotionEffectType, getStrength, setPermanent, setStrengthMethods inherited from class net.pottercraft.ollivanders2.effect.O2Effect
age, getAffectedPlayerText, getInformousText, getLegilimensText, getMaxDuration, getMinDuration, getRemainingDuration, getTargetID, isKilled, isPermanent, kill
-
Constructor Details
-
CONFUSION
public CONFUSION(@NotNull @NotNull Ollivanders2 plugin, int duration, boolean isPermanent, @NotNull @NotNull UUID pid) Constructor for creating a confusion (nausea) potion effect.Creates an effect that applies the Minecraft NAUSEA potion effect to the target player. The duration parameter is used as the base time; the actual duration applied will be randomized by the parent class (baseTime × random multiplier between 1-5). Sets strength to 1 for full nausea effect amplification and detection text to "feels confused".
- Parameters:
plugin- a callback to the pluginduration- the duration in ticks, snapped to min of 2 minutes, max of 5 minutesisPermanent- ignored - potion effects cannot be permanentpid- the unique ID of the player to confuse
-
-
Method Details
-
doRemove
public void doRemove()Perform cleanup when the confusion effect is removed.The default implementation does nothing, as potion effect removal is handled by the parent class (PotionEffectSuper). When this effect is removed, the NAUSEA potion effect is automatically stripped from the player by the parent class.
-