diff --git a/src/main/java/com/gmail/nossr50/Combat.java b/src/main/java/com/gmail/nossr50/Combat.java index 335f90da1..bccff85b0 100644 --- a/src/main/java/com/gmail/nossr50/Combat.java +++ b/src/main/java/com/gmail/nossr50/Combat.java @@ -181,7 +181,7 @@ public class Combat public static void combatAbilityChecks(Player attacker, PlayerProfile PPa) { //Check to see if any abilities need to be activated - if(PPa.getAxePreparationMode() && mcPermissions.getInstance().axesAbility(attacker)) + if(PPa.getAxePreparationMode()) Skills.abilityCheck(attacker, SkillType.AXES); if(PPa.getSwordsPreparationMode()) Skills.abilityCheck(attacker, SkillType.SWORDS); diff --git a/src/main/java/com/gmail/nossr50/datatypes/ToolType.java b/src/main/java/com/gmail/nossr50/datatypes/ToolType.java index e7ec01890..1560307c1 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/ToolType.java +++ b/src/main/java/com/gmail/nossr50/datatypes/ToolType.java @@ -1,5 +1,6 @@ package com.gmail.nossr50.datatypes; +import org.bukkit.Material; import org.bukkit.inventory.ItemStack; import com.gmail.nossr50.m; @@ -118,7 +119,7 @@ public enum ToolType case AXE: return m.isAxes(is); case FISTS: - return is == null; + return is.equals(Material.AIR); case HOE: return m.isHoe(is); case PICKAXE: diff --git a/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java index 3a54497fd..390d96194 100644 --- a/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java @@ -224,7 +224,7 @@ public class mcPlayerListener implements Listener player.updateInventory(); } - if(LoadProperties.enableAbilities && m.abilityBlockCheck(block)) + if(LoadProperties.enableAbilities && (m.abilityBlockCheck(block) || block.getType() == Material.AIR)) { if(block != null && m.isHoe(is) && !mat.equals(Material.DIRT) && !mat.equals(Material.GRASS) && !mat.equals(Material.SOIL)) Skills.activationCheck(player, SkillType.HERBALISM); diff --git a/src/main/java/com/gmail/nossr50/skills/Skills.java b/src/main/java/com/gmail/nossr50/skills/Skills.java index e56b0382f..4278dea5d 100644 --- a/src/main/java/com/gmail/nossr50/skills/Skills.java +++ b/src/main/java/com/gmail/nossr50/skills/Skills.java @@ -94,7 +94,8 @@ public class Skills } } - public static void monitorSkill(Player player, PlayerProfile PP, long curTime, SkillType skill){ + public static void monitorSkill(Player player, PlayerProfile PP, long curTime, SkillType skill) + { ToolType tool = skill.getTool(); AbilityType ability = skill.getAbility(); if(tool.getToolMode(PP) && curTime - (tool.getToolATS(PP) * 1000) >= 4000)