There's a question on how to implement the enchantment checking - specific items may only be enchanted by specific enchantments. I think we should add these functions:
I think the server should build a list of applicable enchantments based on the enchanting rules in the MC wiki, but if a plugin modifies this list and adds an incompatible enchantment, the server should NOT discard that enchantment, rather, it should handle it as if there was a version of minecraft that supports the enchantments together (just like there were versions that didn't support some combinations, such as Unbreaking on Shears).
class cEnchantment
{
enum eEnchantmentType { enchProtection ... }; // <-- NAME the enchantment enum
...
/** Returns true if the item type supports the specified enchantment type and level */
static bool CanEnchantItemType(short a_ItemType, eEnchantmentType a_EnchantmentType, int a_Level);
/** Returns true if the specified item can be enchanted with the specified enchantment
This includes checks for mutually exclusive enchantments, such as Sharpness and Smite */
static bool CanEnchantItem(const cItem & a_Item, eEnchantmentType a_EnchantmentType, int a_Level);
} ;
I think the server should build a list of applicable enchantments based on the enchanting rules in the MC wiki, but if a plugin modifies this list and adds an incompatible enchantment, the server should NOT discard that enchantment, rather, it should handle it as if there was a version of minecraft that supports the enchantments together (just like there were versions that didn't support some combinations, such as Unbreaking on Shears).

