Set the durability (if higher than max, it will be set to the max) @param is the item @param dmg the durability
(ItemStack is, short dmg)
| 279 | * @param dmg the durability |
| 280 | */ |
| 281 | public static void setDurability(ItemStack is, short dmg) { |
| 282 | if (!is(is)) { |
| 283 | return; |
| 284 | } |
| 285 | |
| 286 | is.setDurability(dmg > getMaxDurability(is) ? getMaxDurability(is) : dmg); |
| 287 | } |
| 288 | |
| 289 | /** |
| 290 | * Set the durability (if higher than max, it will be set to the max) |
no test coverage detected