mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +01:00
Fixed my fix (because Bukkit is stupid & durability counts up).
This commit is contained in:
parent
162dbaed0f
commit
472bfa51da
@ -206,7 +206,7 @@ public class Excavation
|
|||||||
if(!player.getItemInHand().containsEnchantment(Enchantment.DURABILITY))
|
if(!player.getItemInHand().containsEnchantment(Enchantment.DURABILITY))
|
||||||
{
|
{
|
||||||
short durability = player.getItemInHand().getDurability();
|
short durability = player.getItemInHand().getDurability();
|
||||||
durability -= LoadProperties.abilityDurabilityLoss;
|
durability += LoadProperties.abilityDurabilityLoss;
|
||||||
player.getItemInHand().setDurability(durability);
|
player.getItemInHand().setDurability(durability);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -266,7 +266,7 @@ public class Mining
|
|||||||
if(!player.getItemInHand().containsEnchantment(Enchantment.DURABILITY))
|
if(!player.getItemInHand().containsEnchantment(Enchantment.DURABILITY))
|
||||||
{
|
{
|
||||||
short durability = player.getItemInHand().getDurability();
|
short durability = player.getItemInHand().getDurability();
|
||||||
durability -= LoadProperties.abilityDurabilityLoss;
|
durability += LoadProperties.abilityDurabilityLoss;
|
||||||
player.getItemInHand().setDurability(durability);
|
player.getItemInHand().setDurability(durability);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -263,13 +263,9 @@ public class WoodCutting
|
|||||||
{
|
{
|
||||||
if(!player.getItemInHand().containsEnchantment(Enchantment.DURABILITY))
|
if(!player.getItemInHand().containsEnchantment(Enchantment.DURABILITY))
|
||||||
{
|
{
|
||||||
System.out.println("BEFORE");
|
|
||||||
System.out.println(player.getItemInHand().getDurability());
|
|
||||||
short durability = player.getItemInHand().getDurability();
|
short durability = player.getItemInHand().getDurability();
|
||||||
durability -= LoadProperties.abilityDurabilityLoss;
|
durability += LoadProperties.abilityDurabilityLoss;
|
||||||
player.getItemInHand().setDurability(durability);
|
player.getItemInHand().setDurability(durability);
|
||||||
System.out.println("AFTER");
|
|
||||||
System.out.println(player.getItemInHand().getDurability());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user