Skip to content
BasaltSoftware
Bedrock 1.26.60

Site colour

Discord
Esc

    ↑↓ moveEnter openEsc close

    Keyboard shortcuts
    Ctrl K
    Search the whole site, from any page
    /
    Jump to the sidebar search, or search the whole site where there isn't one
    Enter
    Open the top search result
    Esc
    Clear the search, or close this panel
    ?
    Show these shortcuts
    Items

    EnchantmentType

    An enchantment by its id, as minecraft:sharpness.

    Class in @minecraft/server

    An enchantment by its id, as minecraft:sharpness.

    import { EnchantmentType } from '@minecraft/server';
    constructor(enchantmentType: string);
    Parameters
    enchantmentType
    string
    Throws
    • TypeError for an enchantment that doesn’t exist.

    read-only

    readonly id: string;

    read-only

    readonly maxLevel: number;

    The highest level it goes to.

    Enchantment.type, ItemEnchantableComponent.getEnchantment, ItemEnchantableComponent.getEnchantments, ItemEnchantableComponent.hasEnchantment, ItemEnchantableComponent.removeEnchantment