Ignore self damage in teleport entity protection.

This commit is contained in:
KHobbits 2012-12-29 07:35:26 +00:00
parent bbb478c51f
commit fc89867e4a
2 changed files with 2 additions and 2 deletions

View File

@ -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);
}

View File

@ -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