Updating Tree Feller to use .getMaxDurability() API calls

This commit is contained in:
nossr50
2012-03-02 11:31:30 -08:00
parent 05cea84dcc
commit 0a97c1dc62
2 changed files with 1 additions and 17 deletions

View File

@ -73,7 +73,7 @@ public class WoodCutting
player.getItemInHand().setDurability((short) (player.getItemInHand().getDurability()+durabilityLoss));
//This is to prevent using wood axes everytime you tree fell
if(player.getItemInHand().getDurability() >= Repair.getMaxDurability(player.getItemInHand())
if((player.getItemInHand().getDurability() >= player.getItemInHand().getType().getMaxDurability())
|| player.getItemInHand().getType() == Material.AIR || player.getItemInHand() == null)
{
player.sendMessage(ChatColor.RED+"YOUR AXE SPLINTERS INTO DOZENS OF PIECES");