Enchantment.fromString

Creates an enchantment from a string.

class Enchantment
static @safe
fromString
(
string name
,
ubyte level
)

Examples

Enchantment.fromString("sharpness", 1);
Enchantment.fromString("Fire Protection", 4);
Enchantment.fromString("silk-touch", 1);
Enchantment.fromString("minecraft:protection", 2);

Meta