> For the complete documentation index, see [llms.txt](https://docs.easy.gg/scripting/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.easy.gg/scripting/bedwars-scripting/events/statuseffectadded.md).

# StatusEffectAdded

Example usage:

```lua
Events.StatusEffectAdded(function(event)
    if (event.statusEffect == StatusEffectType.NO_KNOCKBACK) then
        local player = event.entity:getPlayer()
        if (player == nil) then
            return
        end
        -- Give the player a knockback baguette
        InventoryService.giveItem(player, ItemType.BAGUETTE, 1, true)
    end
end)
```

### Parameters

#### entity: [Entity](/scripting/bedwars-scripting/objects/entity.md)

The entity that received the status effect.

#### statusEffect: [StatusEffectType](/scripting/bedwars-scripting/types/statuseffecttype.md)

The type of status effect that was added to the entity.
