mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-01 05:04:43 +02:00
Updating Tree Feller to use .getMaxDurability() API calls
This commit is contained in:
@ -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");
|
||||
|
Reference in New Issue
Block a user