Bukkit/CraftBukkit — pull request #1156 by andrepl (2013-05-05 20:28:57+00:00)
Title: Allow plugins to enchantnormally unenchantable items. Adds BUKKIT-1849

##### The Issue
It's currently not possible for a plugin to allow enchanting of an otherwise un-enchantable item using the enchanting table.

##### Justification for this PR:
It should be possible for a plugin to override default enchanting behaviour, allowing otherwise unsafe enchantments.

##### PR Breakdown:

This commit causes EnchantItemEvent to be called with an empty list of enchantments, allowing a plugin to provide it's own set of enchantments when vanilla minecraft would not allow any. It also bypasses the UnsafeEnchantment check since a plugin should be permitted to apply any enchantments they like, and vanilla should not generate unsafe enchantments of its own.

##### Testing Results and Materials:

This test plugin allows Fishing rods to be enchanted with Efficiency, Unbreaking, Fortune, Looting, Fire Aspect, Thorns and Power at the enchanting table.

Source Code: https://gist.github.com/andrepl/5522053
Binary: https://www.box.com/s/n2nhfdd4umuraswod8tn

##### JIRA Ticket:
BUKKIT-1849 https://bukkit.atlassian.net/browse/BUKKIT-1849