mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-01-23 16:41:20 +01:00
Revert "Have the PvP flag apply to self-attack."
This reverts commit d8dd86dfe8
.
Fixes WORLDGUARD-3312.
This commit is contained in:
parent
372155b5c3
commit
a03aaa45b1
@ -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;
|
||||
boolean pvp = event.getEntity() instanceof Player && playerAttacker != null && !playerAttacker.equals(event.getEntity());
|
||||
if (isWhitelisted(event.getCause(), event.getWorld(), pvp)) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user