> 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/enchant.md).

# Enchant

Example usage:

<pre class="language-lua"><code class="lang-lua"><strong>Events.Enchant(function(event)
</strong>    -- Play the Learn Fire sound if a player receives a Fire 3 Enchant
    if (event.enchant == EnchantType.FIRE_3) then
         SoundService.playSound(Sound.WHIM_LEARN_FIRE)
    end
end)
</code></pre>

### Parameters

#### player: [Player](/scripting/bedwars-scripting/objects/player.md)

The player who researched the enchant.

#### enchant: [EnchantType](/scripting/bedwars-scripting/types/enchanttype.md)

Type of enchant researched by the player.

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

If set to true, the enchant research will be cancelled.
