Why is the /enchant command giving me an error when I go outside the normal level bounds?

When I tried to use the /enchant command on an item to get sharpness 6, it wouldn't work and gave me an error. Is there a way to toggle safe enchants? Or is there a different way to approach this?


The /enchant command doesn't support out of bounds enchantments. Try using /give instead:

/give @p diamond_axe{Enchantments:[{id:"minecraft:sharpness",lvl:19s},{id:"minecraft:fire_aspect",lvl:45s}]}