Improve enchantment handling

Improve enchantment handling by using an integer instead of a whole
class