Class HEALTH_BOOST
HEALTH_BOOST applies Minecraft's HEALTH_BOOST potion effect to temporarily increase the target player's maximum health capacity for the duration of the effect. Unlike the HEAL instant effect which restores health immediately, HEALTH_BOOST maintains an elevated maximum health cap while the effect is active. The effect is powered by the Minecraft potion effect system with strength (amplifier) set to 1, determining the additional health capacity. When the effect expires, the player's maximum health returns to normal. The effect is detectable by mind-reading spells (Legilimens) which report the target "feels stronger".
- See Also:
-
Field Summary
Fields inherited from class net.pottercraft.ollivanders2.effect.O2Effect
affectedPlayerText, duration, effectType, informousText, kill, legilimensText, p, permanent, targetID -
Constructor Summary
ConstructorsConstructorDescriptionHEALTH_BOOST(@NotNull Ollivanders2 plugin, int duration, boolean isPermanent, @NotNull UUID pid) Constructor for creating a sustained health boost potion effect. -
Method Summary
Modifier and TypeMethodDescriptionvoiddoRemove()Perform cleanup when the health boost 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
-
HEALTH_BOOST
public HEALTH_BOOST(@NotNull @NotNull Ollivanders2 plugin, int duration, boolean isPermanent, @NotNull @NotNull UUID pid) Constructor for creating a sustained health boost potion effect.Creates a potion effect that increases the target player's maximum health using Minecraft's HEALTH_BOOST potion effect type. The effect is detected by information spells as the target "feels stronger".
- Parameters:
plugin- a callback to the MC 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 boost
-
-
Method Details
-
doRemove
public void doRemove()Perform cleanup when the health boost effect is removed.The default implementation does nothing, as HEALTH_BOOST is a potion effect whose effects are automatically managed by the Minecraft potion system. When the effect expires or is manually removed, the player's maximum health automatically returns to normal.
-