Fix infinite durability.

For whatever reason, the Bukkit API thinks that 'Durability" and "Damage"
are synonymous.
This commit is contained in:
wizjany 2013-03-18 13:20:30 -04:00
parent 7f080f920d
commit fa80f5f67f

View File

@ -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);
}
}