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 void
addModifierAfter
(Supplier<DamageStepType> type, DamageModifier modifier) Adds a modifier that applies just after the step.void
addModifierAfter
(DamageStepType type, DamageModifier modifier) Adds a modifier that applies just after the step.default void
addModifierBefore
(Supplier<DamageStepType> type, DamageModifier modifier) Adds a modifier that applies just before the step.void
addModifierBefore
(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, setCancelled
Methods 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
-