public class LUCK extends PotionEffectSuper
Luck potion effect that increases the player's item drop rates and loot quality.

LUCK applies Minecraft's LUCK potion effect to enhance the target player's fortune with improved item drop rates and loot quality. The effect increases the likelihood of receiving better loot from mobs, fishing, and mining while the effect is active. The effect is powered by the Minecraft potion effect system with strength (amplifier) set to 1, determining the luck magnitude. The effect is detectable by mind-reading spells (Legilimens) and information spells (Informous) which report the target "feels lucky". The player receives an affectation notification of "You feel lucky." when the effect is applied.

See Also:
  • Constructor Details

    • LUCK

      public LUCK(@NotNull @NotNull Ollivanders2 plugin, int duration, boolean isPermanent, @NotNull @NotNull UUID pid)
      Constructor for creating a luck potion effect.

      Creates a potion effect that increases the target player's fortune with improved item drop rates using Minecraft's LUCK potion effect type. The effect is detected by information spells as the target "feels lucky" and notifies the player "You feel lucky."

      Parameters:
      plugin - a callback to the MC plugin
      duration - the duration in ticks, snapped to min of 2 minutes, max of 5 minutes
      isPermanent - ignored - potion effects cannot be permanent
      pid - the unique ID of the player to bless with luck
  • Method Details

    • doRemove

      public void doRemove()
      Perform cleanup when the luck effect is removed.

      The default implementation does nothing, as LUCK 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 item drop rates return to normal.

      Specified by:
      doRemove in class O2Effect