# EntityDamage

[entity](https://docs.easy.gg/scripting/bedwars-scripting/objects/entity "mention")Example usage:

```lua
Events.EntityDamage(function(event)
    local matchDurationSec = MatchService.getMatchDurationSec()
    -- Double all damage in the game after 15 minutes
    if (matchDurationSec > 15 * 60) then
        event.damage = event.damage * 2
    end
    
    -- Disable damage in first 45s of the game
    if (matchDurationSec < 45) then
        event.cancelled = true;
    end
end)
```

### Parameters

#### entity: [Entity](https://docs.easy.gg/scripting/bedwars-scripting/objects/entity)

The entity getting damaged.

#### fromEntity: [Entity](https://docs.easy.gg/scripting/bedwars-scripting/objects/entity) | nil

The attacker (if one exists).

#### damage: number <mark style="color:yellow;">\[modifiable]</mark>

Amount of damage that will be dealt.

#### knockback: [Knockback](https://docs.easy.gg/scripting/bedwars-scripting/objects/knockback) <mark style="color:yellow;">\[modifiable]</mark>

Amount of knockback that will be applied.

#### cancelled: bool <mark style="color:yellow;">\[modifiable]</mark>

If set to true the damage will be cancelled.
