Interface DamageCalculationEvent.Pre
- All Superinterfaces:
Cancellable,DamageCalculationEvent,Event
- All Known Subinterfaces:
AttackEntityEvent.Pre,DamageEntityEvent.Pre
- All Known Implementing Classes:
AbstractDamageCalculationEventPre
- Enclosing interface:
DamageCalculationEvent
Fires before the damage steps and their side effects are applied.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.spongepowered.api.event.entity.DamageCalculationEvent
DamageCalculationEvent.Post, DamageCalculationEvent.Pre -
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddModifierAfter(Supplier<DamageStepType> type, DamageModifier modifier) Adds a modifier that applies just after the step.voidaddModifierAfter(DamageStepType type, DamageModifier modifier) Adds a modifier that applies just after the step.default voidaddModifierBefore(Supplier<DamageStepType> type, DamageModifier modifier) Adds a modifier that applies just before the step.voidaddModifierBefore(DamageStepType type, DamageModifier modifier) Adds a modifier that applies just before the step.default List<DamageModifier> modifiersAfter(Supplier<DamageStepType> type) Gets an unmodifiable list of all modifiers that applies just after the step.modifiersAfter(DamageStepType type) Gets an unmodifiable list of all modifiers that applies just after the step.default List<DamageModifier> Gets an unmodifiable list of all modifiers that applies just before the step.Gets an unmodifiable list of all modifiers that applies just before the step.Methods inherited from interface org.spongepowered.api.event.Cancellable
isCancelled, setCancelledMethods inherited from interface org.spongepowered.api.event.entity.DamageCalculationEvent
baseDamage, entity
-
Method Details
-
modifiersBefore
Gets an unmodifiable list of all modifiers that applies just before the step.- Parameters:
type- The step type- Returns:
- The list of modifiers
-
modifiersBefore
Gets an unmodifiable list of all modifiers that applies just before the step.- Parameters:
type- The step type- Returns:
- The list of modifiers
-
addModifierBefore
Adds a modifier that applies just before the step.- Parameters:
type- The step typemodifier- The modifier
-
addModifierBefore
Adds a modifier that applies just before the step.- Parameters:
type- The step typemodifier- The modifier
-
modifiersAfter
Gets an unmodifiable list of all modifiers that applies just after the step.- Parameters:
type- The step type- Returns:
- The list of modifiers
-
modifiersAfter
Gets an unmodifiable list of all modifiers that applies just after the step.- Parameters:
type- The step type- Returns:
- The list of modifiers
-
addModifierAfter
Adds a modifier that applies just after the step.- Parameters:
type- The step typemodifier- The modifier
-
addModifierAfter
Adds a modifier that applies just after the step.- Parameters:
type- The step typemodifier- The modifier
-