mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-02-22 07:11:49 +01:00
Ignore self damage in teleport entity protection.
This commit is contained in:
parent
bbb478c51f
commit
fc89867e4a
@ -75,7 +75,7 @@ public class EssentialsEntityListener implements Listener
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
if (attacker.hasInvulnerabilityAfterTeleport() || defender.hasInvulnerabilityAfterTeleport())
|
||||
if (!attacker.equals(defender) && (attacker.hasInvulnerabilityAfterTeleport() || defender.hasInvulnerabilityAfterTeleport()))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
@ -233,7 +233,7 @@ public class EssentialsProtectEntityListener implements Listener
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// This code will prevent explosions near protected rails, signs or protected chests
|
||||
// TODO: Use protect db instead of this code
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user