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

@ -97,6 +97,14 @@ public void onPlayerItem(PlayerItemEvent event) {
Block block = event.getBlockClicked(); Block block = event.getBlockClicked();
ItemStack item = event.getItem(); 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) { if (plugin.useRegions && !event.isBlock() && block != null) {
Vector pt = toVector(block.getRelative(event.getBlockFace())); Vector pt = toVector(block.getRelative(event.getBlockFace()));
LocalPlayer localPlayer = plugin.wrapPlayer(player); LocalPlayer localPlayer = plugin.wrapPlayer(player);