Merge branch 'master' of github.com:mcMMO-Dev/mcMMO into configurable

This commit is contained in:
nossr50
2019-06-12 11:07:54 -07:00
3 changed files with 118 additions and 10 deletions

View File

@ -138,7 +138,8 @@ public final class Woodcutting {
*/
protected static boolean handleDurabilityLoss(Set<BlockState> treeFellerBlocks, ItemStack inHand) {
if(inHand.getItemMeta().getEnchants().get(Enchantment.DURABILITY) >= 1) {
if(inHand.getItemMeta().getEnchants().get(Enchantment.DURABILITY) != null
&& inHand.getItemMeta().getEnchants().get(Enchantment.DURABILITY) >= 1) {
return true;
}