mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-24 03:25:24 +01:00
Fix infinite durability.
For whatever reason, the Bukkit API thinks that 'Durability" and "Damage" are synonymous.
This commit is contained in:
parent
7f080f920d
commit
fa80f5f67f
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user