Package kr.toxicity.model.api.nms
Interface HitBoxListener.OnDamage
- Enclosing interface:
HitBoxListener
public static interface HitBoxListener.OnDamage
Functional interface for handling damage events.
- Since:
- 1.15.2
-
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull HitBoxListener.OnDamageandThen(@NotNull HitBoxListener.OnDamage other) Chains this handler with another.booleanevent(@NotNull HitBox hitBox, @NotNull ModelDamageSource source, double damage) Handles a damage event.
-
Method Details
-
event
boolean event(@NotNull @NotNull HitBox hitBox, @NotNull @NotNull ModelDamageSource source, double damage) Handles a damage event.- Parameters:
hitBox- the target hitboxsource- the damage sourcedamage- the damage amount- Returns:
- true to cancel the damage, false otherwise
- Since:
- 1.15.2
-
andThen
@NotNull default @NotNull HitBoxListener.OnDamage andThen(@NotNull @NotNull HitBoxListener.OnDamage other) Chains this handler with another.- Parameters:
other- the other handler- Returns:
- the combined handler
- Since:
- 1.15.2
-