mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-23 19:16:40 +01:00
Don't block self-damage if PVP is denied.
This commit is contained in:
parent
8570921049
commit
f4700ded12
@ -379,7 +379,7 @@ public void onDamageEntity(DamageEntityEvent event) {
|
||||
String what;
|
||||
|
||||
/* PVP */
|
||||
if (event.getEntity() instanceof Player && (attacker = event.getCause().getFirstPlayer()) != null) {
|
||||
if (event.getEntity() instanceof Player && (attacker = event.getCause().getFirstPlayer()) != null && !attacker.equals(event.getEntity())) {
|
||||
Player defender = (Player) event.getEntity();
|
||||
|
||||
canDamage = query.testBuild(target, associable, DefaultFlag.PVP)
|
||||
|
Loading…
Reference in New Issue
Block a user