getEnchantment

fun CommandContext<CommandSourceStack>.getEnchantment(name: String): Enchantment?

Retrieves an enchantment from the command context.