mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-25 02:27:42 +01:00
Have the PvP flag apply to self-attack.
Closes WORLDGUARD-3278.
This commit is contained in:
parent
9a569d7ed8
commit
d8dd86dfe8
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user