Class HERBICIDE_POTION


public final class HERBICIDE_POTION extends O2SplashPotion
Herbicide Potion - a splash potion that damages plant-based entities and kills plants.

This is a splash potion designed to be thrown rather than consumed directly. When thrown, it deals full damage to plant-based entities (Creepers and Creakings) and creates a plant-killing effect in a 4-block radius splash area. The potion will also harm other living creatures (including players), but at reduced intensity (10% of normal damage).

Effects when splashed:

  • Full Instant Damage II effect for Creepers and Creakings
  • Reduced intensity (10%) for all other entities including players
  • HERBICIDE stationary spell effect that kills plants in the 4-block radius
Since:
2.2.7
See Also:
  • Constructor Details

    • HERBICIDE_POTION

      public HERBICIDE_POTION(@NotNull @NotNull Ollivanders2 plugin)
      Constructor for Herbicide Potion.

      Initializes the splash potion with its ingredients (Lionfish Spines, Flobberworm Mucus, Horklump Juice, and Standard Potion Ingredients), description text, potion color, and the Instant Damage effect. Sets up the 30-second duration for the plant-killing effect.

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

    • drink

      public void drink(@NotNull @NotNull org.bukkit.entity.Player player)
      Drink the Herbicide Potion - no effect when consumed directly.

      This is a splash potion intended to be thrown, not consumed. Drinking it has no special effect. The potion's primary functionality is triggered through the splash event when thrown, which damages plant-based entities and kills plants in the affected area.

      Specified by:
      drink in class O2Potion
      Parameters:
      player - the player who drank the potion
    • doOnPotionSplashEvent

      public void doOnPotionSplashEvent(@NotNull @NotNull org.bukkit.event.entity.PotionSplashEvent event)
      Handle the splash potion event and apply herbicide effects.

      When the potion splashes:

      • Creepers and Creakings receive full damage intensity from the potion effect
      • All other entities (players, mobs, etc.) receive reduced damage (10% intensity)
      • A HERBICIDE stationary spell is created at the splash location to kill plant blocks in the affected radius (4 blocks) for the duration of the potion effect (30 seconds)
      Specified by:
      doOnPotionSplashEvent in class O2SplashPotion
      Parameters:
      event - the splash potion thrown event containing affected entities and location