Fixed Archery PVP/PVE enablement not being used properly

This commit is contained in:
bm01 2012-06-05 15:47:52 +02:00
parent a1296596fa
commit 63c663b8c1

View File

@ -188,16 +188,17 @@ public class Combat {
} }
} }
else if (damager instanceof Arrow) { else if (damager instanceof Arrow) {
if (!configInstance.getArcheryPVP() && ((Arrow) damager).getShooter().getType().equals(EntityType.PLAYER)) { if (((Arrow) damager).getShooter().getType() != EntityType.PLAYER) {
if (targetIsPlayer || targetIsTamedPet) { return;
}
if (targetIsPlayer || targetIsTamedPet) {
if (!configInstance.getArcheryPVP()) {
return; return;
} }
} }
else if (!configInstance.getArcheryPVE()) {
if (!configInstance.getArcheryPVE() && !((Arrow) damager).getShooter().getType().equals(EntityType.PLAYER)) { return;
if (!targetIsPlayer || !targetIsTamedPet) {
return;
}
} }
archeryCheck(event, plugin); archeryCheck(event, plugin);