I kinda stopped as i saw you where already working on it,
But i did this, when clicked on the enchant table, i send a window aka the enchantment table window, from there i had to do getid but getid needed player + slot, but the change didn't send player.
When a player added a item into the slot, so i couldn't check if the item was supported, stopped there, as close after i read you where working on it, asumed you where also making it as a plugin.
Edit:
Btw, wouldn't it be better as a plugin anyway ?
I am still happy if we got enchantment so i am not complaining :p. but yeah.
But i did this, when clicked on the enchant table, i send a window aka the enchantment table window, from there i had to do getid but getid needed player + slot, but the change didn't send player.
When a player added a item into the slot, so i couldn't check if the item was supported, stopped there, as close after i read you where working on it, asumed you where also making it as a plugin.
Edit:
Btw, wouldn't it be better as a plugin anyway ?
I am still happy if we got enchantment so i am not complaining :p. but yeah.