From a16d5b62cf7a8b095c8a0a94158985d27daba6e7 Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Sat, 2 Feb 2013 20:23:40 +0100 Subject: [PATCH] Fix issue #620 --- .../nossr50/skills/utilities/CombatTools.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/skills/utilities/CombatTools.java b/src/main/java/com/gmail/nossr50/skills/utilities/CombatTools.java index ee6839b6c..721dca74d 100644 --- a/src/main/java/com/gmail/nossr50/skills/utilities/CombatTools.java +++ b/src/main/java/com/gmail/nossr50/skills/utilities/CombatTools.java @@ -271,11 +271,6 @@ public final class CombatTools { AcrobaticsManager acrobaticsManager = new AcrobaticsManager(Users.getPlayer(player)); acrobaticsManager.dodgeCheck(event); } - - if (Unarmed.pvpEnabled && heldItem.getType() == Material.AIR && Permissions.deflect(player)) { - UnarmedManager unarmedManager = new UnarmedManager(Users.getPlayer(player)); - unarmedManager.deflectCheck(event); - } } else { if (Swords.pveEnabled && damager instanceof LivingEntity && ItemChecks.isSword(heldItem) && Permissions.counterAttack(player)) { @@ -308,8 +303,16 @@ public final class CombatTools { ArcheryManager archeryManager = new ArcheryManager(mcMMOPlayer); archeryManager.skillShot(event); - if (target instanceof Player && Permissions.daze(shooter)) { - archeryManager.dazeCheck((Player) target, event); + if (target instanceof Player) { + if (Unarmed.pvpEnabled && ((Player) target).getItemInHand().getType() == Material.AIR && Permissions.deflect((Player) target)) { + UnarmedManager unarmedManager = new UnarmedManager(Users.getPlayer((Player) target)); + unarmedManager.deflectCheck(event); + } + + + if (Permissions.daze(shooter)) { + archeryManager.dazeCheck((Player) target, event); + } } if (!(shooter.getItemInHand().containsEnchantment(Enchantment.ARROW_INFINITE)) && Permissions.trackArrows(shooter)) {