Package org.bukkit.event.entity
Class EntityDamageByEntityEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
org.bukkit.event.entity.EntityDamageEvent
org.bukkit.event.entity.EntityDamageByEntityEvent
- All Implemented Interfaces:
Cancellable
Called when an entity is damaged by an entity
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.entity.EntityDamageEvent
EntityDamageEvent.DamageCause, EntityDamageEvent.DamageModifier
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Field Summary
Fields inherited from class org.bukkit.event.entity.EntityEvent
entity
-
Constructor Summary
ConstructorDescriptionEntityDamageByEntityEvent
(Entity damager, Entity damagee, EntityDamageEvent.DamageCause cause, double damage) EntityDamageByEntityEvent
(Entity damager, Entity damagee, EntityDamageEvent.DamageCause cause, Map<EntityDamageEvent.DamageModifier, Double> modifiers, Map<EntityDamageEvent.DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions) -
Method Summary
Modifier and TypeMethodDescriptionReturns the entity that damaged the defender.Methods inherited from class org.bukkit.event.entity.EntityDamageEvent
getCause, getDamage, getDamage, getFinalDamage, getHandlerList, getHandlers, getOriginalDamage, isApplicable, isCancelled, setCancelled, setDamage, setDamage
Methods inherited from class org.bukkit.event.entity.EntityEvent
getEntity, getEntityType
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
EntityDamageByEntityEvent
public EntityDamageByEntityEvent(@NotNull Entity damager, @NotNull Entity damagee, @NotNull EntityDamageEvent.DamageCause cause, double damage) -
EntityDamageByEntityEvent
public EntityDamageByEntityEvent(@NotNull Entity damager, @NotNull Entity damagee, @NotNull EntityDamageEvent.DamageCause cause, @NotNull Map<EntityDamageEvent.DamageModifier, Double> modifiers, @NotNull Map<EntityDamageEvent.DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions)
-
-
Method Details
-
getDamager
Returns the entity that damaged the defender.- Returns:
- Entity that damaged the defender.
-