Fixed item durability disable for hoes.

This commit is contained in:
sk89q 2011-01-28 00:59:19 -08:00
parent 2f12da6bc6
commit 2f6b51e811

View File

@ -96,6 +96,14 @@ public void onPlayerItem(PlayerItemEvent event) {
Player player = event.getPlayer();
Block block = event.getBlockClicked();
ItemStack item = event.getItem();
if (!plugin.itemDurability) {
// Hoes
if (item.getTypeId() >= 290 && item.getTypeId() <= 294) {
item.setDamage((byte)-1);
player.setItemInHand(item);
}
}
if (plugin.useRegions && !event.isBlock() && block != null) {
Vector pt = toVector(block.getRelative(event.getBlockFace()));