Bukkit/CraftBukkit — pull request #939 by evilmidget38 (2012-11-24 21:16:17+00:00)
Title: PrepareRepairItemEvent and RepairItemEvent - BUKKIT-3019

This addresses BUKKIT-3019 and adds two new events. Example uses can be found at the leaky ticket. The reason this has been split into two events is two mirror the functionality found in CraftItemEvent and PrepareCraftItemEvent.

As to individual changes made in this PR:

f was changed to public, as it's the result inventory, which allows for easy access in NetServerHandler.

The changes done in a(IInventory) are because whenever a one of the two slots was set, d() would be called, the server would update, and the event would be called. I found that it was called about 3 times, meaning not only unnecessary calculations were being performed, but it would call the event three times.

Leaky Ticket: https://bukkit.atlassian.net/browse/BUKKIT-3019
Bukkit PR: https://github.com/Bukkit/Bukkit/pull/723