Package org.bukkit.event.entity

# Class EntityDamageByBlockEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
org.bukkit.event.entity.EntityDamageEvent
org.bukkit.event.entity.EntityDamageByBlockEvent

All Implemented Interfaces:
  `Cancellable`

public class EntityDamageByBlockEvent extends EntityDamageEvent
Called when an entity is damaged by a block

## 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

Constructors
Constructor
Description
`EntityDamageByBlockEvent(@Nullable Block damager, @NotNull Entity damagee, @NotNull EntityDamageEvent.DamageCause cause, double damage)`
`EntityDamageByBlockEvent(@Nullable Block 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 Summary

Modifier and Type
Method
Description
`@Nullable Block`
`getDamager()`
Returns the block that damaged the player.

### 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

`callEvent, getEventName, isAsynchronous`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### EntityDamageByBlockEvent

public EntityDamageByBlockEvent(@Nullable @Nullable Block damager, @NotNull @NotNull Entity damagee, @NotNull @NotNull EntityDamageEvent.DamageCause cause, double damage)

### EntityDamageByBlockEvent

public EntityDamageByBlockEvent(@Nullable @Nullable Block damager, @NotNull @NotNull Entity damagee, @NotNull @NotNull EntityDamageEvent.DamageCause cause, @NotNull @NotNull Map<EntityDamageEvent.DamageModifier,Double> modifiers, @NotNull @NotNull Map<EntityDamageEvent.DamageModifier,? extends Function<? super Double,Double>> modifierFunctions)

## Method Details

### getDamager

@Nullable public @Nullable Block getDamager()
Returns the block that damaged the player.

Returns:
  Block that damaged the player