Class MobEffectEvent.Applicable

Enclosing class:
MobEffectEvent

public static class MobEffectEvent.Applicable extends MobEffectEvent
This event is fired to check if a MobEffectInstance can be applied to an entity.

It will be fired whenever LivingEntity.canBeAffected(MobEffectInstance) would be invoked.

  • Field Details

  • Constructor Details

  • Method Details

    • getEffectInstance

      public MobEffectInstance getEffectInstance()
      Overrides:
      getEffectInstance in class MobEffectEvent
    • setResult

      public void setResult(MobEffectEvent.Applicable.Result result)
      Changes the result of this event.
    • getResult

      Returns the result of this event, which controls if the mob effect will be applied.
      Returns:
      the result of this event, which controls if the mob effect will be applied
    • getApplicationResult

      public boolean getApplicationResult()
      Returns If the mob effect should be applied or not, based on the current event result.
      Returns:
      If the mob effect should be applied or not, based on the current event result