Bukkit/Bukkit — pull request #1001 by rockon999 (2014-01-06 10:31:01+00:00)
Title: Added isRepairable() to Material.java

The Issue:

Developers cannot simply check if a Material is repairable.

Justification for this PR:

Plugins often have to check if the item's durability is correct, so played can't cheat the system (e.g. Player sells DIAMOND_SWORD with very little durability left for the same price as a full durability DIAMOND_SWORD). They can't however just check durability, because some blocks (e.g. WOOL) use it to determine properties other than durability. This fixes that issue by giving Developers a way to tell if the item they are dealing with has repairable durability (e.g. DIAMOND_SWORD), or if the durability is used as data (e.g. WOOL).

PR Breakdown:

This adds "isRepairable()" to Material.java. This returns true if the item can be repaired. Items can be repaired in two ways: Anvils and Crafting Tables. This is detailed at http://minecraft.gamepedia.com/Item_repair.

Testing Results and Materials:
None needed.