From 63c663b8c1ba68599f1d9a4e8dc0eb71000d5788 Mon Sep 17 00:00:00 2001 From: bm01 Date: Tue, 5 Jun 2012 15:47:52 +0200 Subject: [PATCH] Fixed Archery PVP/PVE enablement not being used properly --- src/main/java/com/gmail/nossr50/util/Combat.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/util/Combat.java b/src/main/java/com/gmail/nossr50/util/Combat.java index 5472abf6b..46dd5f5d3 100644 --- a/src/main/java/com/gmail/nossr50/util/Combat.java +++ b/src/main/java/com/gmail/nossr50/util/Combat.java @@ -188,16 +188,17 @@ public class Combat { } } else if (damager instanceof Arrow) { - if (!configInstance.getArcheryPVP() && ((Arrow) damager).getShooter().getType().equals(EntityType.PLAYER)) { - if (targetIsPlayer || targetIsTamedPet) { + if (((Arrow) damager).getShooter().getType() != EntityType.PLAYER) { + return; + } + + if (targetIsPlayer || targetIsTamedPet) { + if (!configInstance.getArcheryPVP()) { return; } } - - if (!configInstance.getArcheryPVE() && !((Arrow) damager).getShooter().getType().equals(EntityType.PLAYER)) { - if (!targetIsPlayer || !targetIsTamedPet) { - return; - } + else if (!configInstance.getArcheryPVE()) { + return; } archeryCheck(event, plugin);