Sets the durability of this item @param durability Durability of this item @deprecated durability is now part of ItemMeta. To avoid confusion and misuse, #getItemMeta(), #setItemMeta(ItemMeta) and Damageable#setDamage(int) should be used instead. This is because any call to
(final short durability)
| 208 | * ItemMeta which was created before this call. |
| 209 | */ |
| 210 | @Deprecated |
| 211 | public void setDurability(final short durability) { |
| 212 | ItemMeta meta = getItemMeta(); |
| 213 | if (meta != null) { |
| 214 | ((Damageable) meta).setDamage(durability); |
| 215 | setItemMeta(meta); |
| 216 | } |
| 217 | } |
| 218 | |
| 219 | /** |
| 220 | * Gets the durability of this item |
no test coverage detected