Interface ItemEffectHandler

All Known Implementing Classes:
BuffSpeedEffect, HealEffect
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 interface ItemEffectHandler
Functional interface for defining item effects that can be applied to entities.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    apply(Entity player, EffectConfig cfg)
    Apply a single effect to the player.
  • Method Details

    • apply

      boolean apply(Entity player, EffectConfig cfg)
      Apply a single effect to the player.
      Parameters:
      player - the player entity
      cfg - the effect configuration containing effect parameters
      Returns:
      true if the effect was successfully applied; false otherwise