Have the PvP flag apply to self-attack.

Closes WORLDGUARD-3278.
This commit is contained in:
sk89q 2015-01-08 00:35:30 -08:00
parent 9a569d7ed8
commit d8dd86dfe8

View File

@ -424,7 +424,7 @@ public void onDamageEntity(DamageEntityEvent event) {
// Block PvP like normal even if the player has an override permission
// because (1) this is a frequent source of confusion and
// (2) some users want to block PvP even with the bypass permission
boolean pvp = event.getEntity() instanceof Player && playerAttacker != null && !playerAttacker.equals(event.getEntity());
boolean pvp = event.getEntity() instanceof Player && playerAttacker != null;
if (isWhitelisted(event.getCause(), event.getWorld(), pvp)) {
return;
}