Fixed my fix (because Bukkit is stupid & durability counts up).

This commit is contained in:
GJ 2012-02-23 02:26:44 -05:00
parent 162dbaed0f
commit 472bfa51da
3 changed files with 3 additions and 7 deletions

View File

@ -206,7 +206,7 @@ public class Excavation
if(!player.getItemInHand().containsEnchantment(Enchantment.DURABILITY))
{
short durability = player.getItemInHand().getDurability();
durability -= LoadProperties.abilityDurabilityLoss;
durability += LoadProperties.abilityDurabilityLoss;
player.getItemInHand().setDurability(durability);
}
}

View File

@ -266,7 +266,7 @@ public class Mining
if(!player.getItemInHand().containsEnchantment(Enchantment.DURABILITY))
{
short durability = player.getItemInHand().getDurability();
durability -= LoadProperties.abilityDurabilityLoss;
durability += LoadProperties.abilityDurabilityLoss;
player.getItemInHand().setDurability(durability);
}
}

View File

@ -263,13 +263,9 @@ public class WoodCutting
{
if(!player.getItemInHand().containsEnchantment(Enchantment.DURABILITY))
{
System.out.println("BEFORE");
System.out.println(player.getItemInHand().getDurability());
short durability = player.getItemInHand().getDurability();
durability -= LoadProperties.abilityDurabilityLoss;
durability += LoadProperties.abilityDurabilityLoss;
player.getItemInHand().setDurability(durability);
System.out.println("AFTER");
System.out.println(player.getItemInHand().getDurability());
}
}