Skip to main content

Class: EnchantmentTypes

Contains a catalog of Minecraft Enchantment Types that are available in this world.

Constructors

new EnchantmentTypes()

private new EnchantmentTypes(): EnchantmentTypes

Returns

EnchantmentTypes

Methods

get()

static get(enchantmentId): EnchantmentType

Parameters

ParameterTypeDescription
enchantmentIdstringIdentifier of the enchantment. For example,
"minecraft:flame".

Returns

EnchantmentType

If available, returns an EnchantmentType object that represents the specified enchantment.

Remarks

Retrieves an enchantment with the specified identifier.


getAll()

Beta

static getAll(): EnchantmentType[]

Returns

EnchantmentType[]

Remarks

Returns a collection of all available enchantment types.