CombatDamageContext

public final class CombatDamageContext

Owns one-shot overrides for programmatic damage calls.

Bukkit fires damage events synchronously. A caller opens a scope immediately around LivingEntity.damage(...) and the matching EliteMobs filter consumes the override at the beginning of that event. Consuming it before running downstream listeners prevents nested damage events from inheriting the outer hit's override.

Types

Link copied to clipboard
Stable fantasy-independent classification for passives that alter traps or blasts only.
Link copied to clipboard
public final class ClassAbilityDamageDomain extends Record
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public final class DamageOverride extends Record
Link copied to clipboard
public final class PlayerDamageSource extends Record
Link copied to clipboard
@FunctionalInterface()
public interface Scope implements AutoCloseable

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public static boolean isClassAbilityDamageActive()
Link copied to clipboard
public static boolean isDamageTransferActive()
Link copied to clipboard
public static boolean isPlayerToEliteBypassActive()
True while the current thread is synchronously delivering damage opened by runPlayerToEliteBypass.
Link copied to clipboard
public static CombatDamageContext.Scope multiplyEliteToPlayer(double multiplier)
Link copied to clipboard
public static void runClassAbilityDamage(Runnable damageCall)
Runs class-sourced damage through the bypass pipeline while retaining its origin for synchronous passive evaluation.
public static void runClassAbilityDamage(CombatDamageContext.ClassAbilityDamageDomain domain, Runnable damageCall)
Runs class damage with orthogonal target-shape and delivery identity for synchronous passive evaluation.
Link copied to clipboard
public static void runEliteToPlayerBypass(Runnable damageCall)
Link copied to clipboard
public static void runEliteToPlayerMultiplier(double multiplier, Runnable damageCall)
Link copied to clipboard
public static void runPlayerToEliteBypass(Runnable damageCall)

public static void runPlayerToEliteBypass(CombatDamageContext.PlayerDamageSource source, Runnable damageCall)
Runs custom damage while retaining the cast-time progression identity until every synchronous damage listener has finished.
Link copied to clipboard
public static void runPlayerToEliteTransfer(Runnable damageCall)
A transferred hit keeps attribution and scaling, but cannot recursively transfer again.