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) {
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);