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.
Functional interface for defining item effects that can be applied to entities.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
apply
(Entity player, EffectConfig cfg) Apply a single effect to the player.
-
Method Details
-
apply
Apply a single effect to the player.- Parameters:
player
- the player entitycfg
- the effect configuration containing effect parameters- Returns:
true
if the effect was successfully applied;false
otherwise
-