This commit is contained in:
TfT_02 2013-02-02 20:23:40 +01:00
parent e9425625e2
commit a16d5b62cf

View File

@ -271,11 +271,6 @@ public final class CombatTools {
AcrobaticsManager acrobaticsManager = new AcrobaticsManager(Users.getPlayer(player)); AcrobaticsManager acrobaticsManager = new AcrobaticsManager(Users.getPlayer(player));
acrobaticsManager.dodgeCheck(event); acrobaticsManager.dodgeCheck(event);
} }
if (Unarmed.pvpEnabled && heldItem.getType() == Material.AIR && Permissions.deflect(player)) {
UnarmedManager unarmedManager = new UnarmedManager(Users.getPlayer(player));
unarmedManager.deflectCheck(event);
}
} }
else { else {
if (Swords.pveEnabled && damager instanceof LivingEntity && ItemChecks.isSword(heldItem) && Permissions.counterAttack(player)) { if (Swords.pveEnabled && damager instanceof LivingEntity && ItemChecks.isSword(heldItem) && Permissions.counterAttack(player)) {
@ -308,9 +303,17 @@ public final class CombatTools {
ArcheryManager archeryManager = new ArcheryManager(mcMMOPlayer); ArcheryManager archeryManager = new ArcheryManager(mcMMOPlayer);
archeryManager.skillShot(event); archeryManager.skillShot(event);
if (target instanceof Player && Permissions.daze(shooter)) { 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); archeryManager.dazeCheck((Player) target, event);
} }
}
if (!(shooter.getItemInHand().containsEnchantment(Enchantment.ARROW_INFINITE)) && Permissions.trackArrows(shooter)) { if (!(shooter.getItemInHand().containsEnchantment(Enchantment.ARROW_INFINITE)) && Permissions.trackArrows(shooter)) {
archeryManager.trackArrows(target); archeryManager.trackArrows(target);