Interface ServerMobEffectEvents.AllowEarlyRemove

Enclosing class:
ServerMobEffectEvents
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface ServerMobEffectEvents.AllowEarlyRemove
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    allowEarlyRemove(net.minecraft.world.effect.MobEffectInstance effectInstance, net.minecraft.world.entity.LivingEntity entity, EffectEventContext ctx)
    Checks whether an effect may be removed early.
  • Method Details

    • allowEarlyRemove

      boolean allowEarlyRemove(net.minecraft.world.effect.MobEffectInstance effectInstance, net.minecraft.world.entity.LivingEntity entity, EffectEventContext ctx)
      Checks whether an effect may be removed early.

      Note: this event is not called when an effect expires. The behavior of effect expiry typically should not be modified.

      Parameters:
      effectInstance - the instance of the status effect being removed
      entity - the entity on which the effect is being removed
      ctx - context
      Returns:
      whether this effect may be removed