@minecraft/server / EnchantmentTypes
Class: EnchantmentTypes ​
Defined in: @minecraft/server/index.d.ts:8354
Contains a catalog of Minecraft Enchantment Types that are available in this world.
Methods ​
get() ​
staticget(enchantmentId):EnchantmentType|undefined
Defined in: @minecraft/server/index.d.ts:8367
Parameters ​
enchantmentId ​
string
Identifier of the enchantment. For example, "minecraft:flame".
Returns ​
EnchantmentType | undefined
If available, returns an EnchantmentType object that represents the specified enchantment.
Remarks ​
Retrieves an enchantment with the specified identifier.
getAll() ​
staticgetAll():EnchantmentType[]
Defined in: @minecraft/server/index.d.ts:8373
Returns ​
Remarks ​
Returns a collection of all available enchantment types.