mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-09-30 07:37:31 +02: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
|
// Block PvP like normal even if the player has an override permission
|
||||||
// because (1) this is a frequent source of confusion and
|
// because (1) this is a frequent source of confusion and
|
||||||
// (2) some users want to block PvP even with the bypass permission
|
// (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)) {
|
if (isWhitelisted(event.getCause(), event.getWorld(), pvp)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user