summaryrefslogtreecommitdiffstats
path: root/src/main/resources
diff options
context:
space:
mode:
authort00thpick1 <t00thpick1dirko@gmail.com>2014-01-21 19:07:25 -0500
committerNate Mortensen <nate.richard.mortensen@gmail.com>2014-02-06 16:49:10 -0700
commit66471a53263ce8a3df673ef32627187ecdecae7c (patch)
tree0e8998142bea420019e03d7763dce0cd56231de0 /src/main/resources
parent068d8a807b7978643fafe8009f86854db8c97606 (diff)
downloadcraftbukkit-66471a53263ce8a3df673ef32627187ecdecae7c.tar
craftbukkit-66471a53263ce8a3df673ef32627187ecdecae7c.tar.gz
craftbukkit-66471a53263ce8a3df673ef32627187ecdecae7c.tar.lz
craftbukkit-66471a53263ce8a3df673ef32627187ecdecae7c.tar.xz
craftbukkit-66471a53263ce8a3df673ef32627187ecdecae7c.zip
[Bleeding] Correctly enchant books. Fixes BUKKIT-5302
Books can now recieve more than one enchantment. As such, breaking out of the loop after only 1 enchantment is applied is not the correct behavior. This commit also reworks some of the logic surrounding the application of enchantments to the item. By checking if the event doesn't add any enchantments rather than if the original enchantments list is empty, the application code is only reached if enchantments are applied, rendering the "applied" boolean no longer necessary. The ItemStack's Item should only be set once, so it is now set outside of the loop based upon whether or not "flag" is true (with "flag" being whether or not the ItemStack's Item is a book).
Diffstat (limited to 'src/main/resources')
0 files changed, 0 insertions, 0 deletions