mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-02 17:09:35 +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;
|
String what;
|
||||||
|
|
||||||
/* PVP */
|
/* 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();
|
Player defender = (Player) event.getEntity();
|
||||||
|
|
||||||
canDamage = query.testBuild(target, associable, DefaultFlag.PVP)
|
canDamage = query.testBuild(target, associable, DefaultFlag.PVP)
|
||||||
|
Loading…
Reference in New Issue
Block a user