Skip to content

Commit

Permalink
Fix infinite durability.
Browse files Browse the repository at this point in the history
For whatever reason, the Bukkit API thinks that 'Durability" and "Damage"
are synonymous.
  • Loading branch information
wizjany committed Mar 18, 2013
1 parent 7f080f9 commit fa80f5f
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -140,7 +140,7 @@ public void onBlockBreak(BlockBreakEvent event) {
if (held.getTypeId() > 0
&& !(ItemType.usesDamageValue(held.getTypeId())
|| BlockType.usesData(held.getTypeId()))) {
held.setDurability(Material.getMaterial(held.getTypeId()).getMaxDurability());
held.setDurability((short) 0);
player.setItemInHand(held);
}
}
Expand Down

0 comments on commit fa80f5f

Please sign in to comment.