Class PotionEvent.PotionAddedEvent

  • Enclosing class:
    PotionEvent

    public static class PotionEvent.PotionAddedEvent
    extends PotionEvent
    This Event is fired when a new Potion is added to the Entity. This is also fired if the Entity already has this effect but with different duration/level. This Event is not Cancelable This Event does not have a Result.
    • Method Detail

      • getPotionEffect

        @Nonnull
        public EffectInstance getPotionEffect()
        Description copied from class: PotionEvent
        Retuns the PotionEffect.
        Overrides:
        getPotionEffect in class PotionEvent
        Returns:
        the added PotionEffect. This is the umerged PotionEffect if the old PotionEffect is not null.
      • getOldPotionEffect

        @Nullable
        public EffectInstance getOldPotionEffect()
        Returns:
        the old PotionEffect. THis can be null if the entity did not have an effect of this kind before.